View source: R/stacked_barchart.R
stacked_barchart | R Documentation |
stacked_barchart stacked barchart of the top_n features in a relative abundance table.
stacked_barchart(abundance_matrix, top_n = 10)
abundance_matrix |
dataframe; samples are columns and features are rows (relative abundance) |
top_n |
integer; number of taxa to plot in the stacked barchart. Default is 10. |
list
feature_count <- dss_example$merged_abundance_id %>%
tibble::column_to_rownames('featureID')
colnames(feature_count) <- paste0('id', colnames(feature_count))
feature_tax <- dss_example$merged_taxonomy
feature_count <- feature_count[feature_tax$featureID,]
aggregated_list <- aggregate_count(feature_count, feature_tax,
aggregate_by = "Genus")
abundance_matrix <- relab(aggregated_list[['count_df']])
st <- stacked_barchart(abundance_matrix)
st$data
st$plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.