Learn R Programming

spatialEco (version 1.3-0)

overlap: Niche overlap (Warren's-I)

Description

Similarity Statistic for Quantifying Niche Overlap using Warren's-I

Usage

overlap(x, y)

Arguments

x

A matrix, rasterLayer or sp raster class object

y

A matrix, rasterLayer or sp raster class object with the same dimensions of x

Value

A single value that is the I similarity statistic

References

Warren, D. L., R. E. Glor, M. Turelli, and D. Funk. (2008). Environmental Niche Equivalency versus Conservatism: Quantitative Approaches to Niche Evolution. Evolution 62:2868-2883.

Examples

Run this code
# NOT RUN {
  
# add degree of separation in two matrices 
p1 <- abs(matrix(1:50,nr=50,nc=50) + 
         runif(n = 2500, min = -1, max = 1))
p2 <- abs(matrix(1:50,nr=50,nc=50) + 
         rnorm(n = 2500, mean = 1, sd = 1))
 
# High overlap/similarity 
( I <- overlap(p1,p2) ) 

# }

Run the code above in your browser using DataLab