plot_taxa_bars: Plot stacked bar plots to represent taxa compompositions

View source: R/taxonomy-based.R

plot_taxa_barsR Documentation

Plot stacked bar plots to represent taxa compompositions

Description

Stacked bar plots will be generated for each factor level indicated by type_header to display their taxonomic compositions. Only the top few taxa will be displayed as indicated by num_taxa. Mean values are calculated within the factor levels.

Usage

plot_taxa_bars(
  tax_table,
  metadata_map,
  type_header,
  num_taxa,
  data_only = FALSE
)

Arguments

tax_table

A taxa table dataframe. The output of summarize_taxonomy.

metadata_map

The mapping file dataframe.

type_header

The factor (metadata header label) used to create the bars. Means will be taken for each factor level.

num_taxa

The number of top most abundant taxa to display. Additional will be grouped into "Other".

data_only

[OPTIONAL] Set to TRUE if you want the plotting data returned instead of the plot.


leffj/mctoolsr documentation built on Aug. 5, 2022, 1:27 a.m.