Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

otu_table-methods

Build or access the otu_table.


Description

This is the suggested method for both constructing and accessing Operational Taxonomic Unit (OTU) abundance (otu_table-class) objects. When the first argument is a matrix, otu_table() will attempt to create and return an otu_table-class object, which further depends on whether or not taxa_are_rows is provided as an additional argument. Alternatively, if the first argument is an experiment-level (phyloseq-class) object, then the corresponding otu_table is returned.

Usage

otu_table(object, taxa_are_rows, errorIfNULL=TRUE)

## S4 method for signature 'phyloseq'
otu_table(object, errorIfNULL = TRUE)

## S4 method for signature 'otu_table'
otu_table(object, errorIfNULL = TRUE)

## S4 method for signature 'matrix'
otu_table(object, taxa_are_rows)

## S4 method for signature 'data.frame'
otu_table(object, taxa_are_rows)

## S4 method for signature 'ANY'
otu_table(object, errorIfNULL = TRUE)

Arguments

object

(Required). An integer matrix, otu_table-class, or phyloseq-class.

taxa_are_rows

(Conditionally optional). Logical; of length 1. Ignored unless object is a matrix, in which case it is is required.

errorIfNULL

(Optional). Logical. Should the accessor stop with an error if the slot is empty (NULL)? Default TRUE. Ignored if object argument is a matrix (constructor invoked instead).

Value

An otu_table-class object.

See Also

Examples

#
# data(GlobalPatterns)
# otu_table(GlobalPatterns)

phyloseq

Handling and analysis of high-throughput microbiome census data

v1.34.0
AGPL-3
Authors
Paul J. McMurdie <joey711@gmail.com>, Susan Holmes <susan@stat.stanford.edu>, with contributions from Gregory Jordan and Scott Chamberlain
Initial release
2019-04-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.