summarize_taxonomy: Calculate values for coarser taxonomic groupings

View source: R/taxonomy-based.R

summarize_taxonomyR Documentation

Calculate values for coarser taxonomic groupings

Description

Given input as generated from load_taxa_table, calculate relative abundances (or absolute abundances) of taxa at a coarser taxonomic threshold. Taxonomy must have been loaded for this function to work.

Usage

summarize_taxonomy(input, level, relative = TRUE, report_higher_tax = TRUE)

Arguments

input

The input dataset.

level

The taxonomy level to summarize by [integer].

relative

Return relative abundances or not (default = TRUE).

report_higher_tax

Whether or not to return taxonomic strings higher than the indecated level (default = TRUE).

Examples

# Return relative abundances of phyla for each sample
summarize_taxonomy(fruits_veggies, level = 2)

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