Learn R Programming

meteR (version 1.2)

empiricalSAR: Empirical SAR or EAR

Description

computes observed SAR or EAR from raw data

Usage

empiricalSAR(spp, abund, row, col, x, y, Amin, A0, EAR = FALSE)

Arguments

spp
vector of species identities
abund
numberic vector abundances associated with each record
row
identity of row in a gridded landscape associated with each record, or desired number of rows to divide the landcape into
col
identity of column in a gridded landscape associated with each recod, or desired number of columns to divide the landcape into
x
the x-coordinate of an individual if recorded
y
the y-coordinate of an individual if recorded
Amin
the smallest area, either the anchor area for upscaling or the desired area to downscale to
A0
the largest area, either the area to upscale to or the total area from which to downscale
EAR
logical, should the EAR or SAR be computed

Value

an object of class sar inheriting from data.frame with columns A and S giving area and species richness, respectively

Details

Currently only doublings of area are supported. There are several options for specifying areas. Either row and col or x and y must be provided for each data entry (i.e. the length of row and col or x and y must equal the length of spp and abund). If x and y are provided then the landscape is gridded either by specifying Amin (the size of the smallest grid cell) or by providing the number or desired rows and columns via the row and col arguments. If only row and col are provided these are taken to be the row and column identities of each data entry

References

Harte, J. 2011. Maximum entropy and ecology: a theory of abundance, distribution, and energetics. Oxford University Press.

See Also

meteESF, meteSAR, downscaleSAR, upscaleSAR

Examples

Run this code
data(anbo)
anbo.obs.sar <- empiricalSAR(anbo$spp, anbo$count, anbo$row, anbo$col, Amin=1, A0=16)
plot(anbo.obs.sar)
anbo.obs.ear <- empiricalSAR(anbo$spp, anbo$count, anbo$row, anbo$col, Amin=1, A0=16, EAR=TRUE)
plot(anbo.obs.ear)

## empirical SAR from simulated x, y data
anbo$x <- runif(nrow(anbo), 0, 1) + anbo$column
anbo$y <- runif(nrow(anbo), 0, 1) + anbo$row
meteSAR(anbo$spp, anbo$count, x=anbo$x, y=anbo$y, row=4, col=4)

Run the code above in your browser using DataLab