Skip to contents

Create lower and upper limits for an elevational range and add them as separate predictors

Usage

add_predictor_elevationpref(x, layer, lower, upper, transform = "none")

# S4 method for BiodiversityDistribution,ANY,numeric,numeric
add_predictor_elevationpref(x, layer, lower, upper, transform = "none")

Arguments

x

distribution() (i.e. BiodiversityDistribution) object.

layer

A character stating the elevational layer in the Distribution object or SpatRaster object.

lower

numeric value for a lower elevational preference of a species.

upper

numeric value for a upper elevational preference of a species.

transform

character Any optional transformation to be applied. Usually not needed (Default: "none").

Examples

if (FALSE) {
distribution(background) |>
  add_predictor_elevationpref(elevation, lower = 200, upper = 1000)
}