es {rarestR} | R Documentation |
Calculate the Expected Species
Description
Calculate the Expected Species
Usage
es(x, m, method = c("a", "b"), MARGIN = 1)
Arguments
x |
a data vector representing number of individuals for each species |
m |
the sample size parameter that represents the number of individuals randomly drawn from the sample, which by default is set to m=1, but can be changed according to the users' requirements. For ESa, m can not be larger than the sample size |
method |
the calculation approach of Expected Species used, with two options available as "a" and "b" to calculate ESa and ESb, with the default set as "a" |
MARGIN |
a vector giving the subscripts which the function will be applied over, see 'apply'. |
Value
a value of Expected Species
References
Zou Y, Zhao P, Axmacher JC (2023). “Estimating total species richness: Fitting rarefaction by asymptotic approximation.” Ecosphere, 14(1), e4363. doi:10.1002/ecs2.4363.
Examples
data(share, package = 'rarestR')
rowSums(share) #The sum size of each sample is 100, 150 and 200
es(share, m = 100)
es(share, method = "b", m = 100)
# When the m is larger than the total sample size, "NA" will be filled:
es(share, m = 150)