create_statistic_raster | R Documentation |
Summarize the values of multiple layers into one layer. The name of the resulting raster is based on the colnames of the keys data.frame (input) and the values in the first row of this data.frame.
create_statistic_raster(
x,
EPSG = "EPSG:28992",
e = NULL,
funstr = NULL,
statistic = "mean",
keys
)
x |
filename (character) |
EPSG |
coordinate reference system like "EPSG:4326" (character) |
e |
Terra extent object |
funstr |
Optional function to modify raster values. Denote the raster with 'x' (or character between square brackets) (character) |
statistic |
Statistic to apply to selected rasters: mean, min, max, sd, median (character) |
keys |
a one row data.frame (or tibble) with no column, consistently with dplyr::group_keys() (tibble) |
terra::SpatRaster
statistic <- "max"
keys <- data.frame(day=1)
f1 <- system.file("extdata", "HEAD_20080401_l1.idf", package="idf")
f2 <- system.file("extdata", "HEAD_20080501_l1.idf", package="idf")
x <- c(f1, f2)
create_statistic_raster(x, statistic=statistic, keys=keys)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.