assign-otu_table: Assign a new OTU Table to 'x'

Description Usage Arguments Examples

Description

Assign a new OTU Table to x

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
otu_table(x) <- value

## S4 replacement method for signature 'phyloseq,otu_table'
otu_table(x) <- value

## S4 replacement method for signature 'otu_table,otu_table'
otu_table(x) <- value

## S4 replacement method for signature 'phyloseq,phyloseq'
otu_table(x) <- value

Arguments

x

(Required). phyloseq-class

value

(Required). otu_table-class or phyloseq-class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# data(GlobalPatterns)
# # An example of pruning to just the first 100 taxa in GlobalPatterns.
# ex2a <- prune_taxa(taxa_names(GlobalPatterns)[1:100], GlobalPatterns)
# # The following 3 lines produces an ex2b that is equal to ex2a
# ex2b <- GlobalPatterns
# OTU <- otu_table(GlobalPatterns)[1:100, ]
# otu_table(ex2b) <- OTU
# identical(ex2a, ex2b)
# print(ex2b)
# # Relace otu_table by implying the component in context.
# ex2c <- GlobalPatterns
# otu_table(ex2c) <- ex2b
# identical(ex2a, ex2c)

Example output



phyloseq documentation built on Nov. 8, 2020, 6:41 p.m.