PredictEnv | R Documentation |
This function takes lists of SpatRasters that correspond to future or past time periods of a single climate model (e.g., RCP4.5, CCSM3), ensures that the environmental variables are the same as those that the model will be developed on, and projects, clips, and resamples these layers to the characteristics of a given study region. If more than one climate scenario is required, run this function multiple times for each climate scenario.
PredictEnv(
studylayers,
futurelayers,
time_periods,
output = NA,
scenario_name = NA,
maxentproj = TRUE
)
studylayers |
A single SpatRaster or list of raster files that constitute all environmental
variables and parameters (e.g., extent, resolution) used for projecting the modelled relationship
(see |
futurelayers |
A list of SpatRasters or vectors of file-names corresponding to the environmental variables at the different time periods the model will be forecasted/hindcasted to. |
time_periods |
a vector of the time periods the models will be projected to, with the first element
as the year the model will be trained on (usually the current data). The projected time periods should be
given in the same order as the list given in |
output |
If the rasters are to be written to the computer, the full path of the directory where
they will be written out to as .grd files. If there are multiple climate scenarios wanted in this
SDM analysis, give the output directory the name of the climate scenario (e.g., ".../output/RCP4.5).
If set to |
scenario_name |
(optional) If the rasters are to be written to the disk, a character string with the
name of the climate model/scenario. A sub-directory will be created within |
maxentproj |
TRUE/FALSE: Will the MaxEntProj step be run on these data? If so, the NA value of the raster will be set to the maximum raster value + 0.01 instead of the non-numeric NaN when written out. |
Returns a list of multi-layer SpatRasters, with each SpatRaster corresponding to a time period.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.