calc_bc {otuSummary}R Documentation

calculate the Bray-Curtis dissimilarity

Description

This function will calculate the Bray-Curtis distance matrix for community data.

Usage

calc_bc(df)

Arguments

df

data frame or matrix, i.e. OTU or ASV table with sites in rows and species in columns.

Details

This function will calculate the dissimilarity and output as lower triangular distance matrix.

Value

The function returns lower triangular distrance matrix.

Author(s)

Sizhong Yang <yanglzu@163.com>

Examples

data(otuqiime)
mat <- calc_bc(t(otuqiime[,-ncol(otuqiime)]))
mat2 <- as.matrix(mat)
dim(mat2)

[Package otuSummary version 0.1.2 Index]