| spaccBeta | R Documentation |
Analyze how beta diversity changes as sites are accumulated spatially. Partitions beta diversity into turnover (species replacement) and nestedness (species loss) components following Baselga (2010).
spaccBeta(
x,
coords,
n_seeds = 50L,
method = "knn",
index = c("sorensen", "jaccard"),
distance = c("euclidean", "haversine"),
parallel = TRUE,
n_cores = NULL,
progress = TRUE,
seed = NULL,
map = FALSE
)
x |
A site-by-species matrix (presence/absence or abundance). |
coords |
A data.frame with columns |
n_seeds |
Integer. Number of random starting points. Default 50. |
method |
Character. Accumulation method. Default |
index |
Character. Dissimilarity index: |
distance |
Character. Distance method: |
parallel |
Logical. Use parallel processing? Default |
n_cores |
Integer. Number of cores. |
progress |
Logical. Show progress? Default |
seed |
Integer. Random seed. |
map |
Logical. If |
At each step of spatial accumulation, beta diversity is calculated between the accumulated species pool and the newly added site. This reveals how species composition changes as you expand spatially.
Interpretation:
High turnover: New sites contribute different species (replacement)
High nestedness: New sites contribute subsets of existing species (loss)
The sum of turnover and nestedness equals total beta diversity.
An object of class spacc_beta containing:
beta_total |
Matrix of total beta diversity (n_seeds x n_sites-1) |
beta_turnover |
Matrix of turnover component |
beta_nestedness |
Matrix of nestedness component |
distance |
Matrix of cumulative distances |
n_seeds, n_sites, method, index |
Parameters used |
Baselga, A. (2010). Partitioning the turnover and nestedness components of beta diversity. Global Ecology and Biogeography, 19, 134-143.
betapart::beta.pair() for pairwise beta diversity
coords <- data.frame(x = runif(50), y = runif(50))
species <- matrix(rbinom(50 * 30, 1, 0.3), nrow = 50)
beta <- spaccBeta(species, coords, n_seeds = 30)
plot(beta)
# Compare Sorensen vs Jaccard
beta_jac <- spaccBeta(species, coords, index = "jaccard")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.