subset {rbiom} | R Documentation |
Subset samples using the BIOM object's metadata
Description
Subset samples using the BIOM object's metadata
Usage
## S3 method for class 'BIOM'
subset(x, ...)
Arguments
x |
A BIOM object, as returned from read.biom. |
... |
Test to run on the metadata to identify samples to retain. |
Value
A BIOM
object.
See Also
Examples
library(rbiom)
infile <- system.file("extdata", "hmp50.bz2", package = "rbiom")
biom <- read.biom(infile)
ex1 <- subset(biom, Age > 30)
ex2 <- subset(biom, `Body Site` %in% c("Saliva", "Stool"))
ex3 <- subset(biom, Age < 25 & BMI > 22)
[Package rbiom version 1.0.3 Index]