map_levels: Map Taxonomic Levels

View source: R/map_levels.R

map_levelsR Documentation

Map Taxonomic Levels

Description

Map taxa between hierarchy levels.

Usage

map_levels(taxa = NULL, from, to, data)

Arguments

taxa

taxa to convert; if NULL then considering all taxa in the tax.table

from

convert from taxonomic level

to

convert to taxonomic level

data

Either a phyloseq object or its taxonomyTable-class , see the phyloseq package.

Value

mappings

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

References

See citation('microbiome')

Examples

data(dietswap)
m <- map_levels('Akkermansia', from='Genus', to='Phylum',
tax_table(dietswap))
m <- map_levels('Verrucomicrobia', from='Phylum', to='Genus',
tax_table(dietswap))

microbiome/microbiome documentation built on Aug. 22, 2023, 7:12 a.m.