Skip to content

Commit

Permalink
Disable complexity/simplicity examples (for now) under Windows to fix…
Browse files Browse the repository at this point in the history
… CRAN issues (long execution times due to R.utils()).

And fix some typos.
  • Loading branch information
stm committed Feb 20, 2024
1 parent d483e91 commit 6fbe1f7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion R/complexity.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ NULL
#' uncompressed image file size
#' @export
#'
#' @examples
#' @examplesIf .Platform$OS.type != "windows"
#' # Example image with high complexity: trees
#' trees <- img_read(system.file("example_images", "trees.jpg", package = "imagefluency"))
#' #
Expand Down
6 changes: 2 additions & 4 deletions R/imagefluencyApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ NULL
#' @export
#'
#'
#' @examples
#' @examplesIf interactive()
#' ## Only run this example in interactive R sessions
#' if (interactive()) {
#' run_imagefluency()
#' }
#' run_imagefluency()
run_imagefluency <- function() {
appDir <- system.file("imagefluencyApp", package = "imagefluency")
if (appDir == "") {
Expand Down
8 changes: 4 additions & 4 deletions R/simplicity.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NULL
#' @details Image simplicity is calculated as 1 minus the ratio between the
#' compressed and uncompressed file size (i.e., the compression rate). Values
#' can range between 0 (no compression possible, thus extremely complex image)
#' and almost 1 (virtually completely compressed image, thus extremly simple
#' and almost 1 (virtually completely compressed image, thus extremely simple
#' image). Different compression algorithms are implemented. For details, see
#' \code{\link{img_complexity}}.
#'
Expand All @@ -27,14 +27,14 @@ NULL
#' uncompressed file size (i.e., the compression rate)
#' @export
#'
#' @examples
#' @examplesIf .Platform$OS.type != "windows"
#' # Example image with low simplicity: trees
#' trees <- img_read(system.file("example_images", "trees.jpg", package = "imagefluency"))
#' #
#' # display image
#' grid::grid.raster(trees)
#' #
#' # get complexity
#' # get simplicity
#' img_simplicity(trees)
#'
#' # Example image with high simplicity: sky
Expand All @@ -43,7 +43,7 @@ NULL
#' # display image
#' grid::grid.raster(sky)
#' #
#' # get complexity
#' # get simplicity
#' img_simplicity(sky)
#'
#' @references Donderi, D. C. (2006). Visual complexity: A Review.
Expand Down
3 changes: 2 additions & 1 deletion man/img_complexity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions man/img_simplicity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/run_imagefluency.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6fbe1f7

Please sign in to comment.