aggregate_top_taxa {microbiome} | R Documentation

## Aggregate Top Taxa

### Description

Summarize phyloseq data by combining the most abundant taxa.

### Usage

    aggregate_top_taxa(x, top, level)

### Arguments

`x` | `phyloseq-class` object
`top` | Keep the top-n taxa, and merge the rest under the category 'Other'. Instead of top-n numeric this can also be a character vector listing the groups to combine.
`level` | Summarization level (from `rank_names(pseq)`)

### Value

`phyloseq-class` object

### Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

### References

See citation('microbiome')

### Examples

    data(dietswap)
    s <- aggregate_top_taxa(dietswap, top = 3, 'Phylum')

[Package microbiome version 1.6.0 Index]