taxa_stacked | R Documentation |
Display taxa abundances as a stacked bar graph.
taxa_stacked(
biom,
rank = -1,
taxa = 6,
colors = TRUE,
patterns = FALSE,
label.by = NULL,
order.by = NULL,
facet.by = NULL,
dist = "euclidean",
clust = "complete",
other = TRUE,
unc = "singly",
lineage = FALSE,
xlab.angle = 90,
...
)
biom |
An rbiom object, such as from |
rank |
What rank(s) of taxa to display. E.g. |
taxa |
Which taxa to display. An integer value will show the top n
most abundant taxa. A value 0 <= n < 1 will show any taxa with that
mean abundance or greater (e.g. |
colors , patterns |
A character vector of colors or patterns to use in
the graph. A named character vector can be used to map taxon names to
specific colors or patterns. Set to |
label.by , order.by |
What metadata column to use for labeling and/or
sorting the samples across the x-axis. Set |
facet.by |
Dataset field(s) to use for faceting. Must be categorical.
Default: |
dist , clust |
Distance ( |
other |
Sum all non-itemized taxa into an "Other" taxa. When
|
unc |
How to handle unclassified, uncultured, and similarly ambiguous taxa names. Options are:
Abbreviations are allowed. Default: |
lineage |
Include all ranks in the name of the taxa. For instance,
setting to |
xlab.angle |
Angle of the labels at the bottom of the plot.
Options are |
... |
Parameters for underlying functions. Prefixing parameter names with a layer name ensures that a particular parameter is passed to, and only to, that layer. |
A ggplot2
plot. The computed data points and ggplot
command are available as $data
and $code
,
respectively.
Other taxa_abundance:
sample_sums()
,
taxa_boxplot()
,
taxa_clusters()
,
taxa_corrplot()
,
taxa_heatmap()
,
taxa_stats()
,
taxa_sums()
,
taxa_table()
Other visualization:
adiv_boxplot()
,
adiv_corrplot()
,
bdiv_boxplot()
,
bdiv_corrplot()
,
bdiv_heatmap()
,
bdiv_ord_plot()
,
plot_heatmap()
,
rare_corrplot()
,
rare_multiplot()
,
rare_stacked()
,
stats_boxplot()
,
stats_corrplot()
,
taxa_boxplot()
,
taxa_corrplot()
,
taxa_heatmap()
library(rbiom)
biom <- rarefy(hmp50)
taxa_stacked(biom, rank="Phylum")
taxa_stacked(biom, rank = "genus", facet.by = "body site")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.