Learn R Programming

theseus (version 0.1.0)

pstoveg_sample: Converts sample_data slot of a phyloseq object to vegan-compatible matrix

Description

physeq2veg_otu is a helper function intended to convert the species/taxa count slot of a phyloseq object to a vegan-friendly matrix.

Usage

pstoveg_sample(PS)

Arguments

PS

(required) a phyloseq object

Value

A matrix containing a phyloseq object's otu_table slot.

See Also

phyloseq-class otu_table-class otu_table

Examples

Run this code
# NOT RUN {
library(phyloseq)
data("GlobalPatterns")
# inspect otu_table()
dim(otu_table(GlobalPatterns))
str(otu_table(GlobalPatterns))
taxa_are_rows(GlobalPatterns)
gp.otu <- physeq2veg_otu(GlobalPatterns)
dim(gp.otu)
str(gp.otu)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab