plotgg_taxon | R Documentation |
Make a box and whiskers plot of a single taxon, while grouping by a variable.
plotgg_taxon(...) ## Default S3 method: plotgg_taxon( Tab, Map, taxon, x, col = NULL, var.name = "Abundance", theme = theme_blackbox() ) ## S3 method for class 'Dataset' plotgg_taxon( Dat, taxon, x, col = NULL, var.name = "Abundance", theme = theme_blackbox() )
Tab |
Matrix with samples as columns and taxa as rows. |
Map |
Data frame with metadata for Tab. Each row must correspond to a sample in Tab, they must be in the same order, and be named with the same names as the columns in Tab |
taxon |
String indicating which taxon to plot. |
x |
String indicating which variable to use as the x-axis in the plot. Should correspond to a header name in Map |
col |
String indicating which variable to use to color the plot. Can be the same or different as x. It should correspond to a header name in Map. |
var.name |
y-axis label on the plot. |
theme |
A ggplot2 theme to be used woth the plot. |
Dat |
A Dataset object. |
A ggplot2 plot
Sur Herrera Paredes
plotgg_var
data(Rhizo) data(Rhizo.map) data(Rhizo.tax) Dat <- create_dataset(Rhizo,Rhizo.map,Rhizo.tax) # Passing independently an abundance table and mapping file plotgg_taxon(Tab = Dat$Tab, Map = Dat$Map, taxon = "OTU_14834", x = "fraction") plotgg_taxon(Tab = Dat$Tab, Map = Dat$Map, taxon = "OTU_14834", x = "fraction", col = "accession") # Passing a dataset object plotgg_taxon(Dat, taxon = "OTU_14834", x = "fraction") plotgg_taxon(Dat, taxon = "OTU_14834", x = "fraction", col = "accession")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.