View source: R/plot_taxa_composition.R
plot_taxa_composition | R Documentation |
Plot taxon abundance for samples. It is a legacy function from microbiome
.
plot_taxa_composition( x, sample.sort = NULL, taxonomic.level = "Phylum", transform = "compositional", otu.sort = NULL, palette = brewer.pal(12, "Paired"), x.label = "sample", plot.type = "barplot", average_by = NULL, verbose = FALSE, mar = c(5, 12, 1, 1), ... )
x |
|
sample.sort |
Order samples. Various criteria are available:
|
taxonomic.level |
Merge the OTUs (for phyloseq object) into a higher taxonomic level. This has to be one from colnames(tax_table(x)). |
transform |
Data transform to be used in plotting (but not in sample/taxon ordering). The options are 'Z-OTU', 'Z-Sample', 'log10' and 'compositional'. See the |
otu.sort |
Order taxa. Same options as for the sample.sort argument but instead of metadata, taxonomic table is used. Also possible to sort by 'abundance'. |
palette |
The number and palette |
x.label |
Specify how to label the x axis. This should be one of the variables in sample_variables(x). |
plot.type |
Plot type: 'barplot' or 'lineplot'. |
average_by |
Variable to group. |
verbose |
verbose. |
mar |
Figure margins. |
... |
Arguments to be passed (for |
A ggplot
plot object.
## Not run: # Example data library(microbiome) library(microbiomeutilities) data("biogeogut") pseq <- biogeogut plot_taxa_composition(pseq, taxonomic.level = "Phylum") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.