To merge the daily outputs of at least two datasets of the following fonctions from BEE package : bee.calc.metrics_point() ; bee.calc.metrics_morpho() ; bee.calc.escape().
BEE.data.merge(
yourspatraster,
data_metrics_point = NULL,
data_metrics_morpho = NULL,
data_escape = NULL,
crs
): The spatraster you have used to compute baseline(s) and metrics.
: The output of the BEE.calc.metrics_point computed using the argument group_by_event = FALSE.
: The output of the BEE.calc.metrics_morpho computed using the argument per_pix = TRUE.
: The output of the BEE.calc.escape computed using the argument only_days_EE = FALSE AND group_by_event = FALSE.
: A METRICS crs that suits the studdied area.
A list of dataframe (one df per pixel) with the metrics of all the datasets provided in column. If you haven't choose a daily resolution, a mean, median, variance, minimum and maximum will be computed for each variables over the time step present in the data.
The datasets provided must contain daily values with no gaps. This implies the use of specific arguments in the .calc. metrics : bee.calc.metrics_point(..., group_by_event = FALSE) bee.calc.metrics_morpho(..., per_pix = TRUE) bee.calc.escape(..., only_days_EE = FALSE, group_by_event = FALSE).
# Load data:
file_spatraster <- system.file(file.path("extdata",
"copernicus_data_celsius.tiff"),
package = "BioExtremeEvent")
copernicus_data_celsius <- terra::rast(file_spatraster)
file_name_1 <- system.file(file.path("extdata", "metrics_points_pixel.rds"),
package = "BioExtremeEvent")
metrics_points_daily <- readRDS(file_name_1)
file_name_2 <- system.file(file.path("extdata", "metrics_morpho_pixel.rds"),
package = "BioExtremeEvent")
metrics_morpho_daily <- readRDS(file_name_2)
file_name_3 <- system.file(file.path("extdata", "escape_pixel.rds"),
package = "BioExtremeEvent")
escape_daily <- readRDS(file_name_3)
merged_output <- BEE.data.merge(
yourspatraster = copernicus_data_celsius,
data_metrics_point = metrics_points_daily,
data_metrics_morpho = metrics_morpho_daily,
data_escape = escape_daily,
crs = "EPSG:3035")
#> Warning: [as.points] returning a copy
#> Warning: [as.points] returning a copy
#> Warning: [as.points] returning a copy