betas returns a tidy tibble with the beta diversity for each combination of samples.

betas(ta, unique = T, method = "bray", binary = F)

Arguments

ta

Tidyamplicons object.

unique

A logical scalar. Avoid redundancy by removing all self sample comparisons and keep only one of two pairwise comparisons? Default is TRUE.

method

The dissimilarity index. See vegdist for all options. Default is "bray".

binary

A logical scalar. Perform presence/absence standardization before analysis. See vegdist. Default is FALSE.

Details

This function calculates the beta diversity using the vegdist function of Vegan. It will report one diversity estimate for each combination of samples.

Examples

# Initiate abundance matrix
x <- matrix(
 c(1500, 1300, 280, 356),
 ncol = 2
)
rownames(x) <- c("taxon1", "taxon2")
colnames(x) <- c("sample1", "sample2")

# Convert to tidyamplicons object
data <-
  create_tidyamplicons(x, taxa_are_columns = FALSE)

# Report numbers
numbers <- data %>% betas()