subset: Subset samples using the BIOM object's metadata

Description Usage Arguments Value See Also Examples

Description

Subset samples using the BIOM object's metadata

Usage

1
2
## 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

select

Examples

1
2
3
4
5
6
7
8
    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)

rbiom documentation built on Nov. 5, 2021, 9:11 a.m.