betas | R Documentation |
betas
returns a tidy tibble with the beta diversity for each
combination of samples.
betas(ta, unique = T, method = "bray", binary = F)
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 |
binary |
A logical scalar. Perform presence/absence standardization
before analysis. See |
This function calculates the beta diversity using the
vegdist
function of Vegan. It will report one diversity
estimate for each combination of samples.
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.