kuenm_projchanges: Detection of changes in models projected in time

View source: R/kuenm_projchanges.R

kuenm_projchangesR Documentation

Detection of changes in models projected in time

Description

kuenm_projchanges performs map algebra operations to represent how and where models projected in time change compared to the current one. If more than one climate model (GCM) was used, it gives the degree of agreement among all the GCMs per emission scenario.

Usage

kuenm_projchanges(occ, fmod.stats, threshold = 5, current, time.periods,
                  emi.scenarios, clim.models, ext.type,
                  out.dir = "Projection_changes")

Arguments

occ

(character) name of the csv file with all the occurrences used to create final models; columns must be: species, longitude, latitude. In the case of the kuenm package, this must be the name of the file that was used to create final models.

fmod.stats

(character) the name of the folder in which final models are (i.e., the output folder after using the kuenm_modstats) function.

threshold

(numeric) value from 0 to 100 that will be used as threshold, default = 5.

current

(character) pattern to look for when defining which is the scenario of current projection. If not defined coparisons will be performed between the calibration area and time projections defined by the three following arguments.

time.periods

(character or numeric) pattern to be searched when identifying models from distinct time projections. If not defined it is assumed that one time period was considered.

emi.scenarios

(character) pattern to be searched for identifying distinct emission scenarios (e.g., RCP numbers). If not defined it is asumed that only one emission scenario was used.

clim.models

(character) names of that identify climatic models used for project ENMs. If not defined it is assumed that only one climate model was used.

ext.type

(character) vector of pattern(s) to be searched in the folders inside fmod.dir that identify the extrapolation type(s) of model projections. This pattern(s) need to be clearly distinguishable from the rest of the name of the model folder name. For instance, capital letter can be used to separate this pattern from the rest of the folder name (e.g., "EC" will be the patter that denotes extrapolation and clamping in the folder named "M_0.1_F_l_set1_EC").

out.dir

(character) name of the output directory to be created in which subdirectories containing the results of analyses of changes are. Default = "Projection_changes".

Details

If any of the potential sources of variation is equal to one (e.g., only one parameter, or only one climate model), this source of variation will not be considered.

Users must be specific when defining the patterns that the function will search for. This 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 demand of the RAM while perfomring these analyses.

Value

Folders named Changes_("pattern" depending on the ext.type) containing raster layers of the results, which include: changes in suitability, changes in suitable areas, and binary raster layers of models for all scenarios. All results will be written inside out.dir.

Examples

# Models statistics should have been calculated before starting. This can be done using the
# kuenm_modstats function.

# Arguments
occ <- "Sp_occ.csv"
fmod_stats <- "Final_Model_Stats"
thres <- 5
curr <- "current"
emi_scenarios <- c("RCP4.5", "RCP8.5")
c_mods <- c("GCM1", "GCM2")
ext_type <- c("E", "EC", "NE")
out_dir1 <- "Projection_Changes"

kuenm_projchanges(occ = occ, fmod.stats = fmod_stats, threshold = thres,
                  current = curr, emi.scenarios = emi_scenarios,
                  clim.models = c_mods, ext.type = ext_type, out.dir = out_dir1)

manubio13/ku.enm documentation built on Jan. 5, 2024, 5:55 a.m.