Calculate beta diversity from abundance matrix

beta_diversity(X, method = "Bray-Curtis", sample_dim = 2)

Arguments

X

Matrix with of abundances

method

Distance method to be used. One of: "Bray-Curtis"

sample_dim

Dimension that contains samples, 1 for rows and 2 for columns. The other dimension should contain the taxa

Value

A dist object

See also

dist

Examples

mat <- matrix(1:10,ncol = 2) beta_diversity(mat)
#> 1 #> 2 0.4545455