nicheOverlap: Niche overlap

Description Usage Arguments Value Author(s) References Examples

Description

Compute niche overlap from predictions of species distributions with the 'I' or 'D' similarity statistic of Warren et al. (2009). The statistic ranges from 0 (no overlap) to 1 (the distributions are identical).

Usage

1
 nicheOverlap(x, y, stat='I', mask=TRUE, checkNegatives=TRUE) 

Arguments

x

RasterLayer with non-negative values (predictions of the probability that a site is suitable for a species)

y

RasterLayer with non-negative values, as above

stat

character either 'I' or 'D' to get the statistic with that name

mask

logical. If TRUE the function removes cells from x that are NA in y and vice-versa. If you are sure that such cases do not occur you can set this to FALSE to speed up computations

checkNegatives

logical. If TRUE the function checks of any of the values in x and y are negative. If you are sure that such cases do not occur you can set this to FALSE to speed up computations

Value

numeric

Author(s)

Based on SDMTools::Istat by Jeremy VanDerWal

References

Warren, D.L., R.E. Glor, M. Turelli, and D. Funk. 2009. Environmental niche equivalency versus conservatism: quantitative approaches to niche evolution. Evolution 62:2868-2883; Erratum: Evolution 65: 1215

Examples

1
2
3
4
5
6
r1 <- raster(nr=18, nc=36)
r2 <- raster(nr=18, nc=36)
set.seed(0)
r1[] <- runif(ncell(r1))
r2[] <- runif(ncell(r1))
nicheOverlap(r1, r2)

Example output

Loading required package: raster
Loading required package: sp
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
[1] 0.8891728

dismo documentation built on May 2, 2019, 6:07 p.m.