library(pliman)
# create an SpatRaster object based on a matrix
x <- matrix(1:20, nrow = 4, ncol = 5)
rast <- mosaic_input(x)
mosaic_view(rast, viewer = "base", axes = TRUE)
# create a temporary filename for the example
f <- file.path(tempdir(), "test.tif")
mosaic_export(rast, f, overwrite=TRUE)
list.files(tempdir())
Run the code above in your browser using DataLab