View source: R/phy_barplotTaxa.R
phy_barplotTaxa | R Documentation |
A not-fully-finished but "MVP" (minimum viable product) function that plots phyloseq data preferrably in relative abundance.
phy_barplotTaxa( physeq, x = "Sample", tax_fill = NULL, title = NULL, facet = NULL, transform = "compositional" )
physeq |
A phyloseq object |
x |
The x axis variable, default is "Sample", which will plot one column for each sample |
tax_fill |
The taxonomic level to fill bars by |
title |
A character vector to entitle the plot with |
facet |
A character vector of a metadata variable's name |
transform |
A character vector of the transformation method to apply |
A ggplot2
plot, ready to be printed
data("GlobalPatterns") testplotSample <- phy_barplotTaxa(physeq = GlobalPatterns, x = "Sample", tax_fill = "Genus", title = "By Sample", facet = "SampleType", transform = "compositional") testplotSample <- phy_barplotTaxa(physeq = GlobalPatterns, x = "SampleType", tax_fill = "Genus", title = "By Sample", transform = "compositional")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.