Learn R Programming

ENMTools (version 1.1.2)

clamp.env: Takes an emtools.model object and a set of environment layers and clamps the environment layers so that no variable falls outside of the range available in the training data.

Description

Takes an emtools.model object and a set of environment layers and clamps the environment layers so that no variable falls outside of the range available in the training data.

Usage

clamp.env(model, env)

Value

An enmtools model object containing species name, model formula (if any), model object, suitability raster, marginal response plots, and any evaluation objects that were created.

Arguments

model

An enmtools.model object. Alternatively the analysis.df component of an enmtools.model object.

env

A SpatRaster of environmental data.

Examples

Run this code
# \donttest{
monticola.gam <- enmtools.gam(iberolacerta.clade$species$monticola, euro.worldclim[[c(1,5,9,13)]])
euro.clamped <- clamp.env(monticola.gam, euro.worldclim)
clamped.prediction <- predict(monticola.gam, euro.clamped)
terra::plot(clamped.prediction$suitability - monticola.gam$suitability)
# }

Run the code above in your browser using DataLab