Nothing
test_that("multiplication works", {
expect_equal(2 * 2, 4)
})
library(viridis)
library(testthat)
library(imageRy)
library(terra)
library(ggplot2)
test_that("im.ggplot correctly generates a ggplot object", {
# Create a raster with two layers (simulating satellite bands)
r <- rast(nrows = 10, ncols = 10, nlyrs = 2)
values(r) <- runif(200) # Assign random values
# Generate ggplot visualization
ggplot_raster <- im.ggplot(r, layerfill = 1)
# Ensure that the result is a ggplot object
expect_s3_class(ggplot_raster, "ggplot")
# Check that the plot contains a raster (geom_raster)
plot_layers <- lapply(ggplot_raster$layers, function(layer) class(layer$geom)[1])
expect_true("GeomRaster" %in% plot_layers)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.