View source: R/createRichnessMaps.R
createRichnessMaps | R Documentation |
This function stacks binary (presence/absence) species distribution maps to create richness maps for a list of species. If higher taxa are provided (i.e., mammals), separate richness maps for each higher taxon will be created in addition to the full species richness maps. Given hindcasted/forecasted binary maps, future/past species richness will also be calculated. Rasters and .pdf files of each are generated, and the legend is standardized across all .pdf maps for effective comparisons. Finally, provided distribution maps that are constrained by dispersal rate, this function compares between the dispersal-constrained and regular richness maps.
createRichnessMaps(
result_dir,
time_periods,
scenarios = NA,
dispersal = FALSE,
taxonlist = FALSE
)
result_dir |
the directory where the ensembled and binary maps are placed.
Each species should have its own sub-directory, and the forecasted/hindcasted
binary maps should be placed into directories like so: Species/Scenario/Time.
If |
time_periods |
a vector of the years in which the projection will occur with the first element as the original year (the year in which the model was generated). If no precise years are available for future/past time periods (e.g., using data from the Last Glacial Maximum), order the remaining time periods from most current to least current (farthest into the future/past) and give character strings for the years (e.g., "LGM"). |
scenarios |
a vector of character strings detailing the different climate models used in the forecasted/hindcasted species distribution models. If no projection is needed, set to NA (default). |
dispersal |
(logical |
taxonlist |
(optional) data.frame or .csv file path name.
If taxon-specific species richness maps are required, this should correspond to
a list of all species modelled (Column 1) and a selected higher taxon
(Column 2; e.g., Order, Class) to split the richness maps on. If taxon-specific
richness maps are not required, |
writes .pdf files and rasters (.grd) of species richness for all given
taxa, time periods, and scenarios and dispersal constraints to the directory
"result_dir
/RichnessMaps".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.