
Transform predictions from species distribution models to binary
Source:R/transform_SDM.R
transform_SDM.RdUse model-specific threshold values to transform predicted probabilities of
species presence, such as resulting from fit_SDM(), to binary predictions
of presence or absence.
Usage
transform_SDM(
pathin,
SDM,
landscape_name,
regex = ".tif$",
modlist,
stat,
pathout,
overwrite = FALSE
)Arguments
- pathin, SDM, landscape_name
Character strings defining the filepath (
pathin/SDM/landscape_name) containing the predicted probability of presence resulting from each distribution model, such as those created from runningfit_SDM()- regex
Passed to
list.filesfor selecting a subset of rasters frompathin/SDM/landscape_name; default is ".tif$"- modlist
List of model objects of class 'gbm' representing the distribution models to which new predictors should be fit.
- stat
Character string defining the threshold statistic to be used; see
dismo::threshold()for options- pathout
Filepath for the directory where results rasters should be written (
pathout/SDM/landscape_name)- overwrite
Logical; passed to
terra::writeRaster()
Value
Nothing returned to R environment. Writes rasters to
pathout/SDM/landscape_name for each model in modlist