plot_area | R Documentation |
Create an area plot for longitudinal samples
with ggplot2
package.
plot_area( x, xvar = NULL, level = NULL, facet.by = NULL, fill.colors = brewer.pal(6, "Paired"), abund.thres = 0.001, prev.thres = 0.5, ncol = 5, nrow = 5 )
x |
|
xvar |
Column name to plot on x-axis. |
level |
Taxonomic level. OTU/ASV level not supported. |
facet.by |
Column with variable that has multiple measurements. |
fill.colors |
brewer.pal(6,"Paired"). Specify colors. |
abund.thres |
= 0.001 check |
prev.thres |
= 0.1 check |
ncol |
wrap, specify number of columns. |
nrow |
wrap, specify number of rows. |
ggplot
object.
## Not run: library(microbiomeutilities) data("hmp2") ps <- hmp2 ps.rel <- microbiome::transform(ps, "compositional") p <- plot_area(ps.rel, xvar="visit_number", level = "Phylum", facet.by = "subject_id", fill.colors=brewer.pal(6,"Paired")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.