Learn R Programming

tidysdm (version 1.0.0)

extrapol_mess: Multivariate environmental similarity surfaces (MESS)

Description

Compute multivariate environmental similarity surfaces (MESS), as described by Elith et al., 2010.

Usage

extrapol_mess(x, training, .col, ...)

# S3 method for default extrapol_mess(x, training, ...)

# S3 method for stars extrapol_mess(x, ...)

# S3 method for SpatRaster extrapol_mess(x, training, .col, filename = "", ...)

# S3 method for data.frame extrapol_mess(x, training, .col, ...)

# S3 method for SpatRasterDataset extrapol_mess(x, training, .col, ...)

Value

a terra::SpatRaster (data.frame) with the MESS values.

Arguments

x

terra::SpatRaster, stars, terra::SpatRasterDataset or data.frame

training

matrix or data.frame or sf object containing the reference values; each column should correspond to one layer of the terra::SpatRaster object, with the exception of the presences column defined in .col (optional).

.col

the column containing the presences (optional). If specified, it is excluded when computing the MESS scores.

...

additional arguments as for terra::writeRaster()

filename

character. Output filename (optional)

Author

Jean-Pierre Rossi, Robert Hijmans, Paulo van Breugel, Andrea Manica

Details

This function is a modified version of mess in package predicts, with a method added to work on terra::SpatRasterDataset. Note that the method for terra::SpatRasterDataset assumes that each variables is stored as a terra::SpatRaster with time information within x. Time is also assumed to be in years. If these conditions are not met, it is possible to manually extract a terra::SpatRaster for each time step, and use extrapol_mess on those terra::SpatRasters

References

Elith J., M. Kearney M., and S. Phillips, 2010. The art of modelling range-shifting species. Methods in Ecology and Evolution 1:330-342.