dist_gcms | R Documentation |
This function compares future climate projections from multiple General Circulation Models (GCMs) based on their similarity in terms of variables. It calculates distance metrics and plots the results on a heatmap.
dist_gcms(
s,
var_names = c("bio_1", "bio_12"),
study_area = NULL,
scale = TRUE,
method = "euclidean"
)
s |
A list of stacks of General Circulation Models (GCMs). |
var_names |
Character. A vector of names of the variables to compare, or 'all' to include all variables. |
study_area |
An Extent object, or any object from which an Extent object can be extracted. Defines the study area for cropping and masking the rasters. |
scale |
Logical. Whether to apply centering and scaling to the data. Default is |
method |
Character. The correlation method to use. Default is "euclidean". Possible values are: "euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski", "pearson", "spearman", or "kendall". |
A list containing two items: distances
(the calculated distances between GCMs) and heatmap
(a plot displaying the heatmap).
Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com
transform_gcms
flatten_gcms
var_names <- c("bio_1", "bio_12")
s <- import_gcms(system.file("extdata", package = "chooseGCM"), var_names = var_names)
study_area <- terra::ext(c(-80, -30, -50, 10)) |> terra::vect(crs="epsg:4326")
dist_gcms(s, var_names, study_area, method = "euclidean")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.