beta_div_quick: Calculate Beta Diversity Quickly

Description Usage Arguments Details Value See Also Examples

View source: R/beta_div_quick.R

Description

Calculates beta diversity using a modified version of Legendre & Caceres's beta.div

Usage

1
beta_div_quick(Y, method = c("hellinger", "jaccard", "sorensen", "ochiai"))

Arguments

Y

a matrix of presence-absence data; species are columns, sites are rows

method

the method for calculating beta diversity

Details

in Ecology Letters (2013) 16: 951-963 "Beta diversity as the variance of community data: dissimilarity coefficients and partitioning" a function beta.div is provided in the supplement. This function is an abbreviated version that can be used for 4 out of the original's 20 options, and only returns the total beta diversity (original returned many other values). This function was written to be much faster than the original, as the original can be quite slow if being run for 10's of thousands of matrices (think Bayesian posterior of MSOM results).

Value

Returns a single numeric value that is the total beta diversity of the matrix (SS_total/(n-1))

See Also

process_msomStatic

Examples

1
2
3
Y <- matrix(rbinom(18, 1, 0.5), ncol=3)
bd1 <- beta_div_quick(Y, "hellinger")
bd2 <- beta_div_quick(Y, "jaccard")

rBatt/trawlDiversity documentation built on Aug. 14, 2021, 1:01 p.m.