
Recreate a derivative variable based on their range
Source:R/create_derivate_range.R
create_derivate_range.RdThe purpose of this function is to create the range from several derivative
variables. The information to do so is taken from the variable name and it
is assumed that those have been created by ibis.iSDM::predictor_derivate() function.
This function return the range of values from the original data that fall within the set of coefficients. Currently only positive coefficients are taken by default.
Arguments
- env
The original variable stacks as
SpatRasterorstars.- varname
A
characterof the variable name. Needs to be present in"env".- co
A set of coefficients obtained via
stats::coef()and aibis.iSDM::BiodiversityDistributionobject.- to_binary
A
logicalflag if the output should be converted to binary format or left in the original units (Default:FALSE).
Value
A SpatRaster object containing the predictor range.
Details
This function really only makes sense for
'bin','thresh'and'hinge'transformations.For
'hinge'the combinedminis returned.
Note
This is rather an internal function created for a specific use and project. It might be properly described in an example later.
Examples
if (FALSE) { # \dontrun{
# Assuming derivates of temperature have been created for a model, this
# recreates the range over which they apply.
deriv <- create_derivate_range(env, varname = "Temperature",
co = coef(fit), to_binary = TRUE)
} # }