Compute various diversity indices from a vector of species abundances (i.e., one row of a community matrix)
calc_div(
x,
index,
effort = NA,
rare_thres = 0.05,
replace = FALSE,
C_target = NULL,
extrapolate = TRUE,
...
)
is a vector of species abundances
The calculated biodiversity indices. The options are
N
... Number of individuals (total abundance)
S
... Number of species
S_n
... Rarefied or extrapolated number of species for n individuals
S_C
... Estimate species richness of a given level of coverage by C_target_gamma
S_asymp
... Estimated asymptotic species richness
f_0
... Estimated number of undetected species
pct_rare
... The percent of rare species as defined by rare_thres
PIE
... Hurlbert's PIE (Probability of Interspecific Encounter)
S_PIE
... Effective number of species based on PIE
See Details for additional information on the biodiversity statistics.
The standardized number of individuals used for the calculation of rarefied species richness. This can a be single integer or a vector of integers.
The threshold that determines how pct_rare is computed. It can range from (0, 1] and defaults to 0.05 which specifies that any species with less than or equal to 5 considered rare. It can also be specified as "N/S" which results in using average abundance as the threshold which McGill (2011) found to have the best small sample behavior.
Used for PIE
and SPIE
. If TRUE, sampling with
replacement is used. Otherwise, sampling without replacement (default).
When computing coverage based richness (S_C
) then
this argument can be used to specify the coverage to be used for the richness
estimate. This defaults to NA
in which case the target cover
is computed by calc_C_target
(i.e., the largest allowable sample
size).
Boolean which specifies if richness should be extrapolated when effort is larger than the number of individuals using the chao1 method.
additional arguments that can be passed to the function
rarefaction
when computing S_n
.
data(inv_tank)
calc_div(tank_comm[1, ], 'S_n', effort = c(5, 10))
calc_div(tank_comm[1, ], 'S_C', C_target = 0.9)
Run the code above in your browser using DataLab