Description Usage Arguments Details Value Author(s) References Examples
Compute multivariate environmental similarity surfaces (MESS), as described by Elith et al., 2010
1 |
x |
Raster* object |
v |
matrix or data.frame containing the reference values. Each column should correspond to one layer of the Raster* object |
full |
logical. If |
filename |
character. Output filename (optional) |
... |
additional arguments as for |
v
can be obtained for a set of points using extract
.
A RasterBrick with layers corresponding to the input layers and an additional layer with the mess values (if full=TRUE
and nlayers(x) > 1
) or a RasterLayer with the MESS values (if full=FALSE
).
Jean-Pierre Rossi <jean-pierre.rossi@supagro.inra.fr>, Robert Hijmans, Paulo van Breugel
Elith J., M. Kearney M., and S. Phillips, 2010. The art of modelling range-shifting species. Methods in Ecology and Evolution 1:330-342.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | set.seed(9)
r <- raster(ncol=10, nrow=10)
r1 <- setValues(r, (1:ncell(r))/10 + rnorm(ncell(r)))
r2 <- setValues(r, (1:ncell(r))/10 + rnorm(ncell(r)))
r3 <- setValues(r, (1:ncell(r))/10 + rnorm(ncell(r)))
s <- stack(r1,r2,r3)
names(s) <- c('a', 'b', 'c')
xy <- cbind(rep(c(10,30,50), 3), rep(c(10,30,50), each=3))
refpt <- extract(s, xy)
ms <- mess(s, refpt, full=TRUE)
plot(ms)
## Not run:
filename <- paste(system.file(package="dismo"), '/ex/bradypus.csv', sep='')
bradypus <- read.table(filename, header=TRUE, sep=',')
bradypus <- bradypus[,2:3]
files <- list.files(path=paste(system.file(package="dismo"),'/ex', sep=''),
pattern='grd', full.names=TRUE )
predictors <- stack(files)
predictors <- dropLayer(x=predictors,i=9)
reference_points <- extract(predictors, bradypus)
mss <- mess(x=predictors, v=reference_points, full=TRUE)
plot(mss)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.