phyloseq_to_df: Convert phyloseq object to data frame (for exporting).

View source: R/phyloseq_to_df.R

phyloseq_to_dfR Documentation

Convert phyloseq object to data frame (for exporting).

Description

Convert phyloseq object to data frame (for exporting).

Usage

phyloseq_to_df(
  physeq,
  addtax = T,
  addtot = F,
  addmaxrank = F,
  sorting = "abundance"
)

Arguments

physeq

A phyloseq-class object

addtax

Logical; add taxonomy to the result table (default, TRUE)

addtot

Logical; add total OTU abundance to the resulting table (default, FALSE)

addmaxrank

Logical; add the OTU classification at the lowest annotated taxonomic rank to the resulting table (default, FALSE)

sorting

Reorder OTUs according to their total abundance ("abundance", default) or taxonomy (sorting = "taxonomy"); if reordering is not required use 'sorting = NULL'

Value

Data frame with OTU taxonomy and abundance

See Also

phyloseq-class

Examples

data(GlobalPatterns)
GlobalPatternsDF <- phyloseq_to_df(GlobalPatterns)
str(GlobalPatternsDF)


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.