powered by
This function imports GCM stack files from a folder into R.
import_gcms( path = "input_data/WorldClim_data_gcms", extension = ".tif", recursive = TRUE, gcm_names = NULL, var_names = NULL )
A list of stacks, where each element corresponds to a GCM from the specified path.
Character. A string specifying the path to the GCM files.
Character. The file extension of the stack files. Default is ".tif", the standard extension for WorldClim 2.1 data.
".tif"
Logical. Should the function import stacks recursively (i.e., search for files within subfolders)? Default is TRUE.
TRUE
Character. A vector of names to assign to each GCM.
Character. A vector of names to assign to each variable.
Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com
worldclim_data
s <- import_gcms(system.file("extdata", package = "chooseGCM"), var_names = c("bio1", "bio12"))
Run the code above in your browser using DataLab