Area and bar plots of sample-level relative abundance at specified taxonomic levels
plot_abundance.RdArea and bar plots of sample-level relative abundance at specified taxonomic levels
Arguments
- pseq
An object of class
phyloseq- top_n
Integer. Number of taxonomic groups to display, sorted by relative abundance
- taxrank
Character. Taxonomic rank to display. Should be a column name of the
taxa_tableinpseq.- prop_of
Character. Either "top_n" or "total". Indicates whether heights of area/bars should represent the proportion out of the displayed taxonomic groups, or the out of the total.
- type
Character. Either area or bar, specifying which type of plot. Area displays all samples left to right, whereas bars give mean abundances.
- orderby_OTU
Character (optional). The OTU name (i.e. rowname in
otu_table) whose relative abundance you would like to sort by. This is what creates the visual gradient from left to right of, say, Firmicutes.- PALETTE
Character of same length
top_nof palette for area or bar chart.- brewerpal
Character. Name of RColorBrewer palette to use.
- by
Character. Variable in
sample_datato stratify plots by.- ttle
Character. Plot title.