get_taxa_unique {phyloseq} | R Documentation

## Get a unique vector of the observed taxa at a particular taxonomic rank

### Description

This is a simple accessor function to make it more convenient to determine the different taxa present for a particular taxonomic rank in a given `phyloseq-class` object.

### Usage

    get_taxa_unique(physeq, taxonomic.rank=rank_names(physeq)[1], errorIfNULL=TRUE)

### Arguments

`physeq` | (Required). `taxonomyTable-class`, or `phyloseq-class`.
`taxonomic.rank` | (Optional). Character. The taxonomic rank to use. Must select from the set indicated by `get_taxa_unique`. Default is to take the first column of the `taxonomyTable` component.
`errorIfNULL` | (Optional). Logical. Should the accessor stop with an error if the slot is empty (`NULL`)? Default `TRUE`.

### Value

Character vector. Unique vector of the observed taxa at a particular taxonomic rank

### See Also

`get_taxa` `taxa_names` `sample_names`

### Examples

    data(enterotype)
    get_taxa_unique(enterotype)
    data(GlobalPatterns)
    get_taxa_unique(GlobalPatterns, "Family")

[Package phyloseq version 1.34.0 Index]