View source: R/kuenm_modstats_swd.R
kuenm_modstats_swd | R Documentation |
kuenm_modstats_swd calculates raster layers with some descriptive statistics of all model replicates across multiple parameter settings, for models created in SWD format and projected to one or multiple projection areas (scenarios).
kuenm_modstats_swd(sp.name, fmod.dir, format = "asc", statistics,
proj.scenarios, ext.type, out.dir = "Final_Model_Stats")
sp.name |
(character) name of the species. This name must be the one that appears as part of the raster file of each model. If results are from Maxent, this is the name that is in the first column of the csv containing species occurrence data (species) but changing spaces (if there is any) by underscore. |
fmod.dir |
(character) the name of the folder in which final models are
(e.g., the output folder after using the |
format |
(character) format of model raster files. Options are: "asc" or "tif"; default = "asc". |
statistics |
(character) vector of descriptive statistics to be calculated. Options include med = median, mean, min = minimum, max = maximum, range, sd = standard deviation, and se = standard error. By default c("med", "min", "max", "range") are calculated, unless a character vector with the desired statistics is provided. |
proj.scenarios |
(character) vector of pattern(s) that identify each projection area (scenario) to which models were projected. |
ext.type |
(character) vector of pattern(s) to be searched in the folders
inside |
out.dir |
(character) name of the output directory to be created in which resulting raster layers of model statistics will be written. Default = "Final_Model_Stats". |
Users must be specific when defining the patterns that the function will search for. These patterns must be part of the model (raster layer) names so the function can locate each file without problems. This function uses this system of work to avoid high demands of the RAM while performing these analyses.
Folders named Statistics or Statistics_("pattern" depending on the ext.type)
with all the raster layers of the descriptive statistics for models in
fmod.dir
. Folders will be written inside out.dir
.
# Models should be ready before starting these analyses, for an example of how
to create them see https://github.com/marlonecobos/kuenm
# Arguments
sp_name <- "sp1"
fmod_dir <- "Final_Models"
format <- "asc"
project <- TRUE
stats <- c("med", "range")
rep <- TRUE
scenarios <- c("current", "GCM1_RCP4.5", "GCM1_RCP8.5", "GCM2_RCP4.5", "GCM2_RCP8.5")
ext_type <- c("E", "EC", "NE") # you can select only one type of extrapolation if needed
out_dir <- "Final_Model_Stats"
kuenm_modstats_swd(sp.name = sp_name, fmod.dir = fmod_dir,
statistics = stats, proj.scenarios = scenarios,
ext.type = ext_type, out.dir = out_dir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.