This r package “betaC” accompanies a manuscript submitted for revision. This is an anonymous repository for the reviewers. Upon acceptance of the manuscript, the repo will be moved to the author’s github.
The r package and this repository have two main objectives:
To provide easy tools for the calculation of beta_C, a metric that quantifies the non-random component in beta-diversity for a given sample completeness.
To share the simulation code and results that we use in our above-mentioned paper. You can find them in the folder Simulations.
You can install the development version of the package “betaC” from GitHub with:
Please, also install the package “vegan” from CRAN.
Furthermore, “tidyverse” is recommended but the main functions will work without it.
betaC is a beta-diversity index that measures intraspecific spatial aggregation or species turnover in space independently of the size of the regional species pool. This is important because most beta-diversity metrics don’t only respond to the spatial structure of species diversity in an area but also to the total number of species occurring there. So, high beta-diversity can mean that there is a strong spatial clumping of species and/or that there is just a high gamma diversity. People have tried to disentangle these effects with mixed results.
In our paper we make the argument that the species-pool dependence of beta-diversity is linked sampling effects. Sampling effects arises because alpha and gamma scale diversity estimates are by definition based on very different sample sizes (i.e., numbers of individuals captured by a sample). This means that a major part of beta diversity is usually due to a more-individuals effect between alpha and gamma scales and not due to spatial structure. The strength of this sampling effect is stronger in large species pools where sampling curves are typically very steep (i.e. there is a larger jump from alpha to gamma). The steepness of sampling curves is related to sample completeness. We find that by standardizing beta-diversity by sample completeness, we remove the sampling effect and the resulting metric, betaC only responds to spatial aggregation.
To achieve this, we use a combination of individual-based and coverage-based rarefaction (coverage is a measure of sample completeness). The main idea of our approach is that within a species pool alpha and gamma scale diversity estimates are standardized to a common number of individuals, while across species pools we allow the sample size to vary in order to keep a constant gamma-scale sample sample coverage (C) instead.
If you’ve read the paper and you just want to have the code to calculate beta_C, here is all you need to know:
The main function of this package is
beta_C(). Its first argument
x takes a site-by-species abundance matrix as a matrix object or
data frame (sites=rows, species= rows). The second argument
the target coverage used for standardization. The function returns
beta_C as a numeric value. As a default extrapolation is used but
you can also change this using the argument
?beta_C to see the documentation.
The other important function is
C_target(x). Its fits argument
is a site-by-species abundance matrix. It returns the maximum
possible coverage value that can be used to calculate beta_C for
the community matrix
x. As a default it allows for extrapolation,
i.e. it will extrapolate to a sample size that exceeds the smallest
sample size by a factor 2. You can also adjust this extrapolation
factor through the argument
factor = 1 for
interpolation only). However, we caution against values larger than
beta_C(x, C)such that it corresponds to the smallest
C_target()output of all the communities. Type
?C_targetto see the documentation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.