R/utils.R
orient_taxa.Rd
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.
orient_taxa(x, as) # S4 method for otu_table orient_taxa(x, as) # S4 method for phyloseq orient_taxa(x, as)
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. |
#> [1] TRUEx <- soilrep %>% orient_taxa(as = "columns")#> Error in orient_taxa(., as = "columns"): could not find function "orient_taxa"#> Error in h(simpleError(msg, call)): error in evaluating the argument 'physeq' in selecting a method for function 'taxa_are_rows': object 'x' not found