Description Usage Arguments Author(s) Examples
This function uses the ggplot2 package to generate barplot from a given
SummarizedPhyloseq-class
object on a given phylogenic level.
The output is a ggplot object so it can be easily styled using additional
ggplot functions.
1 |
spy |
|
level |
Character. The phyloseq level to use. Must be one of Kingdom, Phylum, Class, Order, Family, Genus, or Species. |
by |
Character. The sample meta-data variable to plot the abundance data againt to. It must be from the sample data's column names. If multiple variables are givin, facets will be used. The default is sample name. See examples. |
legend.show |
Logical variable whether to show the legends. |
plotly |
Logical value. If TRUE, a plotly variable will be returned. |
Chenghao Zhu
1 2 3 4 5 6 7 8 | data(fatigue)
fatigue = transform_sample_counts(physeq, function(x) x/sum(x))
spy = summarizeFromPhyloseq(fatigue)
plot_bar(spy)
plot_bar(spy, "Phylum", by = "Subject")
plot_bar(spy, "Genus", by = c("Subject", "Sex"))
plot_bar(spy, "Genus", by = c("Subject", "Sex"), plotly = T)
plot_bar(spy, "Phylum", by = c("Subject", "age_range", "Sex"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.