map_levels {microbiome} | R 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))

[Package microbiome version 1.14.0 Index]