View source: R/adonis_to_table.R
adonis_to_table | R Documentation |
Quick wrapper to format PERMANOVA results
adonis_to_table(adonis.out, adjR2 = TRUE, new_rownames = NA)
adonis.out |
A |
adjR2 |
A |
new_rownames |
A |
A data.frame
Ready to be passed to kable/DT/flextable
library(gautils)
data(enterotype)
distMat <- phyloseq::distance(microbiome::transform(enterotype, "compositional"), "bray")
adonisObj <- adonis2(distMat ~ SeqTech + Enterotype, by = "margin", permutations = 2000, data = microbiome::meta(enterotype), na.action = na.omit)
adonis_as_table <- adonis_to_table(adonisObj)
adonis.kbl <- kableExtra::kbl(adonis_as_table, digits = 2) %>%
kableExtra::kable_styling()
adonis_as_table2 <- adonis_to_table(adonisObj, new_rownames = c("Sequencing Techonology", "Enterotype Code"))
adonis.kbl2 <- kableExtra::kbl(adonis_as_table2, digits = 2) %>%
kableExtra::kable_styling()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.