orient_taxa: Orient a phyloseq object or otu table to have taxa as rows or...

orient_taxaR Documentation

Orient a phyloseq object or otu table to have taxa as rows or as columns

Description

Puts the phyloseq or otu-table object x in the orientation (taxa as rows or as columns) specified by as. This is useful when passing the otu table on to functions that require the abundance matrix to have a specific orientation and are unaware of the taxa_are_rows(x) property.

Usage

orient_taxa(x, as)

## S4 method for signature 'otu_table'
orient_taxa(x, as)

## S4 method for signature 'phyloseq'
orient_taxa(x, as)

Arguments

x

A phyloseq or otu-table object

as

The matrix dimension that is desired for taxa. Must be "rows" for rows and "columns" or "cols" for columns.

Examples

data(soilrep)
taxa_are_rows(soilrep)
x <- soilrep %>% orient_taxa(as = "columns")
taxa_are_rows(x)

mikemc/speedyseq documentation built on April 22, 2024, 6:40 p.m.