get_taxadf {MicrobiotaProcess} | R Documentation

## get the data of specified taxonomy

### Description

get the data of specified taxonomy

### Usage

    get_taxadf(obj, ...)

    ## S4 method for signature 'phyloseq'
    get_taxadf(obj, taxlevel = 2, ...)

    ## S4 method for signature 'data.frame'
    get_taxadf(obj, taxda, taxa_are_rows, taxlevel, sampleda = NULL, ...)

### Arguments

`obj` | phyloseq, phyloseq class or data.frame the shape of data.frame (nrow sample * column feature taxa_are_rows set FALSE, nrow feature * ncol sample, taxa_are_rows set TRUE).
`...,` | additional parameters.
`taxlevel` | character, the column names of taxda that you want to get. when the input is phyloseq class, you can use 1 to 7.
`taxda` | data.frame, the classifies of feature contained in obj(data.frame).
`taxa_are_rows` | logical, if the column of data.frame are features, it should be set FALSE.
`sampleda` | data.frame, the sample information.

### Value

phyloseq class contained tax data.frame and sample information.

### Author(s)

Shuangbin Xu

### Examples

    library(ggplot2)
    data(test_otu_data)
    phytax <- get_taxadf(test_otu_data, taxlevel=2)
    phytax
    head(phyloseq::otu_table(phytax))
    phybar <- ggbartax(phytax) +
             xlab(NULL) + ylab("relative abundance (%)")

[Package MicrobiotaProcess version 1.0.5 Index]