list(file = "test-im.classify.R", context = "im.classify", test = "multiplication works", user = 0.0400000000000009, system = 0.02, real = 0.220000000000255, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.classify.R", context = "im.classify", test = "im.classify correctly performs k-means classification", user = 0.0599999999999987, system = 0.0100000000000002, real = 0.140000000000327, results = list(list(message = "`unique_classes` has length 3, not length 3.", srcref = c(21, 3, 21, 34, 3, 34, 21, 21), trace = NULL, start_frame = 35, end_frame = 36, test = "im.classify correctly performs k-means classification"), list(message = "`classified_raster` inherits from 'SpatRaster' not 'SpatRaster'.", srcref = c(24, 3, 24, 50, 3, 50, 24, 24), trace = NULL, start_frame = 35, end_frame = 36, test = "im.classify correctly performs k-means classification"))) list(file = "test-im.dvi.R", context = "im.dvi", test = "multiplication works", user = 0, system = 0.02, real = 0.0900000000001455, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.dvi.R", context = "im.dvi", test = "im.dvi correctly computes the Difference Vegetation Index (DVI)", user = 0.00999999999999979, system = 0.0299999999999998, real = 0.170000000000073, results = list(list(message = "as.numeric(values(dvi_result)) (`actual`) not equal to rep(expected_dvi, 100) (`expected`).\n\n", srcref = c(21, 3, 21, 70, 3, 70, 21, 21), trace = NULL, start_frame = 35, end_frame = 37, test = "im.dvi correctly computes the Difference Vegetation Index (DVI)"))) list(file = "test-im.export.R", context = "im.export", test = "multiplication works", user = 0, system = 0.04, real = 0.0600000000004002, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.export.R", context = "im.export", test = "im.export correctly saves a GeoTIFF", user = 0.0800000000000001, system = 0.02, real = 0.240000000000691, results = list(list(message = "file.exists(temp_file) is not TRUE\n\n", srcref = c(15, 3, 15, 37, 3, 37, 15, 15), trace = NULL, start_frame = 35, end_frame = 37, test = "im.export correctly saves a GeoTIFF"), list(message = "dim(exported_raster) (`actual`) not equal to dim(r) (`expected`).\n\n", srcref = c(20, 3, 20, 44, 3, 44, 20, 20), trace = NULL, start_frame = 35, end_frame = 37, test = "im.export correctly saves a GeoTIFF"), list(message = "values(exported_raster) (`actual`) not equal to values(r) (`expected`).\n\n", srcref = c(23, 3, 23, 68, 3, 68, 23, 23), trace = NULL, start_frame = 35, end_frame = 37, test = "im.export correctly saves a GeoTIFF"))) list(file = "test-im.export.R", context = "im.export", test = "im.export rejects invalid file extensions", user = 0.00999999999999979, system = 0.0300000000000002, real = 0.0799999999999272, results = list(list(message = "", srcref = c(30, 3, 30, 69, 3, 69, 30, 30), trace = list(call = list(expect_error(im.export(r, "output.txt"), "Unsupported file format"), expect_condition_matching("error", { { object } }, regexp = regexp, class = class, ..., inherit = inherit, info = info, label = label), quasi_capture(enquo(object), label, capture_matching_condition, matches = matcher), .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), ...), withCallingHandlers(expr, condition = function(cnd) { if (!is.null(matched) || !matches(cnd)) { return() } if (can_entrace(cnd)) { cnd <- cnd_entrace(cnd) } matched <<- cnd if (inherits(cnd, "message") || inherits(cnd, "warning")) { cnd_muffle(cnd) } else if (inherits(cnd, "error") || inherits(cnd, "skip")) { return_from(tl, cnd) } }), eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), im.export(r, "output.txt")), parent = c(0, 1, 2, 3, 4, 3, 0), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), namespace = c("testthat", "testthat", "testthat", "testthat", "base", "rlang", "imageRy"), scope = c("::", ":::", ":::", "local", "::", "::", "::")), start_frame = 35, end_frame = 37, test = "im.export rejects invalid file extensions"))) list(file = "test-im.export.R", context = "im.export", test = "im.export correctly saves a PNG", user = 0.0500000000000007, system = 0, real = 0.109999999999673, results = list(list(message = "file.exists(temp_file) is not TRUE\n\n", srcref = c(40, 3, 40, 37, 3, 37, 40, 40), trace = NULL, start_frame = 35, end_frame = 37, test = "im.export correctly saves a PNG"))) list(file = "test-im.ggplot.R", context = "im.ggplot", test = "multiplication works", user = 0.0299999999999994, system = 0.0500000000000003, real = 0.0800000000008367, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.ggplot.R", context = "im.ggplot", test = "im.ggplot correctly generates a ggplot object", user = 0.360000000000001, system = 0.0799999999999996, real = 0.809999999999491, results = list(list(message = "`ggplot_raster` inherits from 'gg'/'ggplot' not 'ggplot'.", srcref = c(18, 3, 18, 42, 3, 42, 18, 18), trace = NULL, start_frame = 35, end_frame = 36, test = "im.ggplot correctly generates a ggplot object"), list(message = "\"GeomRaster\" %in% plot_layers is not TRUE\n\n", srcref = c(22, 3, 22, 44, 3, 44, 22, 22), trace = NULL, start_frame = 35, end_frame = 37, test = "im.ggplot correctly generates a ggplot object"))) list(file = "test-im.import.R", context = "im.import", test = "multiplication works", user = 0, system = 0.02, real = 0.0299999999997453, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works")))im. list(file = "test-im.import.R", context = "im.import", test = "im.import correctly loads a raster", user = 0.5, system = 0.0800000000000001, real = 1.1899999999996, results = list(list(message = "`available_images` has type 'character', not 'character'.", srcref = c(13, 3, 13, 44, 3, 44, 13, 13), trace = NULL, start_frame = 35, end_frame = 36, test = "im.import correctly loads a raster"), list(message = "length(available_images) > 0 is not TRUE\n\n", srcref = c(14, 3, 14, 43, 3, 43, 14, 14), trace = NULL, start_frame = 35, end_frame = 37, test = "im.import correctly loads a raster"), list(message = "[rast] unknown extent", srcref = c(21, 5, 21, 44, 5, 44, 21, 21), trace = list(call = list(im.import(test_image), tryCatch({ terra::rast(fpath) }, error = function(e) { stop("Failed to load raster: ", im, " - Error: ", e$message) }), tryCatchList(expr, classes, parentenv, handlers), tryCatchOne(expr, names, parentenv, handlers[[1]]), doTryCatch(return(expr), name, parentenv, handler), terra::rast(fpath), terra::rast(fpath), .local(x, ...), messages(r, "rast"), warn(f, paste(unique(x@pntr$getWarnings()), collapse = "\n"))), parent = c(0, 1, 2, 3, 4, 1, 1, 7, 8, 9), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), namespace = c("imageRy", "base", "base", "base", "base", "terra", "terra", "terra", "terra", "terra"), scope = c("::", "::", "local", "local", "local", "::", "::", "local", ":::", ":::")), start_frame = 35, end_frame = 45, test = "im.import correctly loads a raster"), list(message = "`imported_raster` inherits from 'SpatRaster' not 'SpatRaster'.", srcref = c(24, 5, 24, 50, 5, 50, 24, 24), trace = NULL, start_frame = 35, end_frame = 36, test = "im.import correctly loads a raster"), list(message = "nlyr(imported_raster) is not more than 1. Difference: 2", srcref = c(27, 5, 27, 40, 5, 40, 27, 27), trace = NULL, start_frame = 35, end_frame = 37, test = "im.import correctly loads a raster"))) list(file = "test-im.list.R", context = "im.list", test = "multiplication works", user = 0.0200000000000014, system = 0, real = 0.00999999999930878, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.list.R", context = "im.list", test = "im.list correctly retrieves available images", user = 0.00999999999999979, system = 0, real = 0.0299999999997453, results = list(list(message = "`available_images` has type 'character', not 'character'.", srcref = c(13, 3, 13, 44, 3, 44, 13, 13), trace = NULL, start_frame = 35, end_frame = 36, test = "im.list correctly retrieves available images"), list(message = "length(available_images) > 0 is not TRUE\n\n", srcref = c(16, 3, 16, 43, 3, 43, 16, 16), trace = NULL, start_frame = 35, end_frame = 37, test = "im.list correctly retrieves available images"))) list(file = "test-im.multiframe.R", context = "im.multiframe", test = "multiplication works", user = 0, system = 0, real = 0.0200000000004366, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.multiframe.R", context = "im.multiframe", test = "im.multiframe correctly sets up a multi-panel layout", user = 0, system = 0.02, real = 0.0299999999997453, results = list(list(message = "`im.multiframe(2, 2)` produced .", srcref = c(10, 3, 10, 36, 3, 36, 10, 10), trace = NULL, start_frame = 35, end_frame = 36, test = "im.multiframe correctly sets up a multi-panel layout"), list(message = "`par_settings` (`actual`) not equal to c(2, 2) (`expected`).\n\n", srcref = c(16, 3, 16, 37, 3, 37, 16, 16), trace = NULL, start_frame = 35, end_frame = 37, test = "im.multiframe correctly sets up a multi-panel layout"))) list(file = "test-im.ndvi.R", context = "im.ndvi", test = "multiplication works", user = 0.0199999999999996, system = 0.0300000000000002, real = 0.0100000000002183, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.ndvi.R", context = "im.ndvi", test = "im.ndvi correctly computes NDVI values", user = 0.0100000000000016, system = 0, real = 0.0600000000004002, results = list(list(message = "as.numeric(values(ndvi_result)) (`actual`) not equal to rep(expected_ndvi, 100) (`expected`).\n\n", srcref = c(20, 3, 20, 72, 3, 72, 20, 20), trace = NULL, start_frame = 35, end_frame = 37, test = "im.ndvi correctly computes NDVI values"))) list(file = "test-im.pca.R", context = "im.pca", test = "multiplication works", user = 0, system = 0, real = 0.0399999999999636, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.pca.R", context = "im.pca", test = "im.pca correctly performs Principal Component Analysis (PCA)", user = 0.0399999999999991, system = 0.0299999999999998, real = 0.100000000000364, results = list(list(message = "`pca_result` inherits from 'SpatRaster' not 'SpatRaster'.", srcref = c(18, 3, 18, 43, 3, 43, 18, 18), trace = NULL, start_frame = 35, end_frame = 36, test = "im.pca correctly performs Principal Component Analysis (PCA)"), list(message = "nlyr(pca_result) (`actual`) not equal to nlyr(r) (`expected`).\n\n", srcref = c(21, 3, 21, 41, 3, 41, 21, 21), trace = NULL, start_frame = 35, end_frame = 37, test = "im.pca correctly performs Principal Component Analysis (PCA)"), list(message = "any(is.na(values(pca_result))) is not FALSE\n\n", srcref = c(24, 3, 24, 46, 3, 46, 24, 24), trace = NULL, start_frame = 35, end_frame = 37, test = "im.pca correctly performs Principal Component Analysis (PCA)"))) list(file = "test-im.plotRGB.R", context = "im.plotRGB", test = "multiplication works", user = 0, system = 0.02, real = 0.0300000000006548, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.plotRGB.R", context = "im.plotRGB", test = "im.plotRGB correctly plots an RGB image with specified bands", user = 0.0600000000000005, system = 0.0100000000000002, real = 0.149999999999636, results = list(list(message = "`im.plotRGB(r, r = 1, g = 2, b = 3, title = \"Test RGB Plot\")` produced .", srcref = c(14, 3, 14, 76, 3, 76, 14, 14), trace = NULL, start_frame = 35, end_frame = 36, test = "im.plotRGB correctly plots an RGB image with specified bands"))) list(file = "test-im.plotRGB_auto.R", context = "im.plotRGB_auto", test = "multiplication works", user = 0.00999999999999979, system = 0, real = 0.0300000000006548, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.plotRGB_auto.R", context = "im.plotRGB_auto", test = "im.plotRGB.auto correctly plots an RGB image", user = 0, system = 0.02, real = 0.0600000000004002, results = list(list(message = "`im.plotRGB.auto(r, title = \"Test RGB Plot\")` produced .", srcref = c(14, 3, 14, 60, 3, 60, 14, 14), trace = NULL, start_frame = 35, end_frame = 36, test = "im.plotRGB.auto correctly plots an RGB image"))) list(file = "test-im.print.R", context = "im.print", test = "multiplication works", user = 0, system = 0, real = 0.0200000000004366, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.print.R", context = "im.print", test = "im.print prints the expected message", user = 0.0600000000000005, system = 0.02, real = 0.210000000000036, results = list(list(message = "any(grepl(\"I am imageRy\", output)) is not TRUE\n\n", srcref = c(12, 3, 12, 49, 3, 49, 12, 12), trace = NULL, start_frame = 35, end_frame = 37, test = "im.print prints the expected message"))) list(file = "test-im.refresh.R", context = "im.refresh", test = "multiplication works", user = 0.0199999999999996, system = 0.00999999999999979, real = 0.0299999999997453, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.refresh.R", context = "im.refresh", test = "im.refresh correctly runs without installing", user = 0.0199999999999996, system = 0, real = 0.0199999999995271, results = list(list(message = "any(grepl(\"^im.refresh\\\\(\\\\) executed$\", output)) is not TRUE\n\n", srcref = c(15, 3, 15, 64, 3, 64, 15, 15), trace = NULL, start_frame = 35, end_frame = 37, test = "im.refresh correctly runs without installing"))) list(file = "test-im.ridgeline.R", context = "im.ridgeline", test = "multiplication works", user = 0.0199999999999996, system = 0, real = 0.0299999999997453, results = list(list(message = "2 * 2 (`actual`) not equal to 4 (`expected`).\n\n", srcref = c(2, 3, 2, 24, 3, 24, 2, 2), trace = NULL, start_frame = 35, end_frame = 37, test = "multiplication works"))) list(file = "test-im.ridgeline.R", context = "im.ridgeline", test = "im.ridgeline generates a valid ridgeline plot", user = 0.0300000000000011, system = 0, real = 0.0599999999994907, results = list(list(message = "`ridgeline_plot` inherits from 'gg'/'ggplot' not 'ggplot'.", srcref = c(20, 3, 20, 43, 3, 43, 20, 20), trace = NULL, start_frame = 35, end_frame = 36, test = "im.ridgeline generates a valid ridgeline plot"), list(message = "\"GeomDensityRidgesGradient\" %in% plot_layers is not TRUE\n\n", srcref = c(24, 3, 24, 59, 3, 59, 24, 24), trace = NULL, start_frame = 35, end_frame = 37, test = "im.ridgeline generates a valid ridgeline plot")))