bars_fun | R Documentation |
Barplots plotly
bars_fun( data = data, rank = "Genus", top = 10, Ord1 = NULL, sample_labels = FALSE, split = FALSE, split_sid_order = FALSE, relative = TRUE, autoorder = TRUE, ylab = "Abundance", outfile = "plot_compo.html", verbose = TRUE )
data |
a phyloseq object (output from decontam or generate_phyloseq) |
rank |
Taxonomy rank to merge features that have same taxonomy at a certain taxonomic rank (among rank_names(data), or 'ASV' for no glom) |
top |
Number of top taxa to plot |
Ord1 |
Variable used to order sample (X axis) or split the barplot if split = TRUE |
sample_labels |
If true, x axis labels are sample IDS, if false labels displayed are levels from Ord1 argument. Ignored if split = TRUE (FALSE) |
split |
if TRUE make a facet_wrap like grouped by Ord1 (default FALSE) |
relative |
Plot relative (TRUE, default) or raw abundance plot (FALSE) |
autoorder |
Automatic ordering xaxis labels based on Ord1 factor levels with gtools::mixedorder function (TRUE). |
ylab |
Y axis title ("Abundance") |
outfile |
Output html file. |
Returns barplots in an interactive plotly community plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.