View source: R/mobr_boxplots.R
calc_biodiv | R Documentation |
Calculate biodiversity statistics from sites by species table.
calc_biodiv(
abund_mat,
groups,
index,
effort,
extrapolate,
return_NA,
rare_thres
)
abund_mat |
Sites by species table with species abundances in the respective cells |
groups |
Vector with group labels for the sites. The length of the vector has to correspond to the number of rows of the sites by species table. |
index |
The calculated biodiversity indices. The options are
See the documentation of |
effort |
The standardized number of individuals used for the calculation of rarefied species richness. This can a be single value or an integer vector. |
extrapolate |
Boolean which specifies if richness should be extrapolated when effort is larger than the number of individuals using the chao1 method. |
return_NA |
Boolean in which the rarefaction function
returns the observed S when |
rare_thres |
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. |
This function is primarily intended as auxiliary function used in
get_mob_stats
, but can be also used directly for data exploration.
A data.frame
with four columns:
group
... Group label for sites
index
... Name of the biodiversity index
effort
... Sampling effort for rarefied richness
(NA for the other indices)
value
... Value of the biodiversity index
Felix May and Dan McGlinn
McGill, B. J. 2011. Species abundance distributions. Pages 105-122 Biological Diversity: Frontiers in Measurement and Assessment, eds. A.E. Magurran and B.J. McGill.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.