View source: R/transform_gcms.R
transform_gcms | R Documentation |
This function transforms a list of GCM stacks by subsetting it to include only the variables
specified in var_names
, reprojecting it to match the CRS of study_area
,
cropping and masking it to study_area
, and returning a list of data frames.
transform_gcms(s, var_names = c("bio_1", "bio_12"), study_area = NULL)
s |
A list of stacks of General Circulation Models (GCMs). |
var_names |
Character. A vector of names of the variables to include, 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. |
A list of data frames, where each element corresponds to a GCM in the input list.
Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com
summary_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")
transform_gcms(s, var_names, study_area)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.