View source: R/scale_rasters.R
scale_rasters | R Documentation |
Scale a set of rasters
scale_rasters(raster_list, reference_resolution = NULL)
raster_list |
a list of raster objects. |
reference_resolution |
the resolution to resample the rasters to. |
a list of scaled raster objects.
# Create two example rasters
rast_a <- terra::rast(
ncol = 10, nrow = 10,
xmin = 0, xmax = 10,
ymin = 0, ymax = 10,
vals = runif(100)
)
rast_b <- terra::rast(
ncol = 10, nrow = 10,
xmin = 0, xmax = 10,
ymin = 0, ymax = 10,
vals = runif(100)
)
# Scale example rasters in a list
rast_list <- list(rast_a, rast_b)
scale_rasters(rast_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.