Create a stacked barplot to show relative abundance of taxa. convert_proportions converts the dataframe abundance values to percent 100 and returns a transformed dataframe.
melt_metacoder melts the metacoder or phyloseq tables into a dataframe and returns a melted dataframe. stacked_barplots creates a stacked barplots for multiple taxonomic levels and returns a list of stacked barplots.
stacked_barplot(
obj,
tax_level = "Phylum",
fill = "Phylum",
xlabel = "Samples",
faceted = FALSE,
title = NULL,
palette_values = NULL
)An object to be converted to a taxmap object with create_taxmap.
The taxonomic level, Default: 'Phylum'
The taxonomic level by which the bars are filled, Default: 'Phylum'
The label of the x axis, Default: 'Samples'
A boolean to determine if the barplot should be faceted by TreatmentGroup
The title or name of the plot.
A list of the colors to input to be mapped to the plot palette, Default: 'NULL'
Returns a stacked barplot.
Other Visualizations:
alpha_diversity_plot(),
correlation_data(),
correlation_plot(),
correlation_plots(),
heat_tree_parameters(),
heat_tree_plots(),
ordination_plot(),
plot_limits(),
save_alpha_diversity_plots(),
save_correlation_plots(),
save_heat_tree_plots(),
save_ordination_plots(),
save_stacked_barplots(),
stacked_barplots(),
top_coefficients_barplot()
if (FALSE) { # \dontrun{
if (interactive()) {
# An example stacked bar plot
library(MicrobiomeR)
data <- analyzed_silva
palette <- get_color_palette(color_no = 12)
plot <- stacked_barplot(obj = data, palette_values = palette)
plot
}
} # }