Learn R Programming

matR (version 0.9)

BIOMsubset: Take part of (subset) BIOM data

Description

Take part of (subset) an object of class biom by removing rows, columns, or both.

Usage

"["(x, i, j, ...)

Arguments

x
an object (biom)
i
row index (integer, character, or logical)
j
column index (integer, character, or logical)
...
unused

Value

A biom object, the specified subset of x.

Details

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

See Also

BIOM.utils::biom, BIOM.utils::dim.biom

Examples

Run this code
####  explicit subsetting
xx3 [ , 1:8]
xx4 [c ("Bacteria", "Eukaryota"), c ("mgm4575333.3", "mgm4575334.3", "mgm4575335.3")]

####  keep only metagenomes from one biome
xx3 [ , columns (xx3, "biome") == "Tundra biome"]

####  keep only rows matching a search term
xx1 [grepl ("Protein secretion system", rownames(xx1)), ]

Run the code above in your browser using DataLab