View source: R/kuenm_modstats.R
kuenm_modstats | R Documentation |
kuenm_modstats calculates raster layers with some descriptive statistics of all model replicates across multiple parameter settings. All of this, discriminating among models transferred to distinct projection areas (scenarios).
kuenm_modstats(sp.name, fmod.dir, format = "asc", project, statistics, replicated,
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". |
project |
(logical) if TRUE, it is assumed that models were projected to other scenarios. |
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. |
replicated |
(logical) whether or not final models were created performing replicates. |
proj.scenarios |
(character) valid if |
ext.type |
(character) valid if |
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(sp.name = sp_name, fmod.dir = fmod_dir, format = format, project = project,
statistics = stats, replicated = rep, 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.