select: Reduce samples to a specific list

Description Usage Arguments Value See Also Examples

View source: R/select.r

Description

Reduce samples to a specific list

Usage

1
select(biom, samples)

Arguments

biom

A BIOM object, as returned from read.biom.

samples

Sample names, indices, or a logical vector identifying the samples to keep. The latter two should be based on the order of sample names given by colnames(biom$counts).

Value

A BIOM object.

See Also

subset

Examples

1
2
3
4
5
6
7
8
    library(rbiom)
    
    infile <- system.file("extdata", "hmp50.biom", package = "rbiom")
    biom <- read.biom(infile)
    
    ex1 <- select(biom, c('HMP14', 'HMP22', 'HMP03'))
    ex2 <- select(biom, c(32, 11, 28, 16, 46, 5))
    ex3 <- select(biom, 1:50 %% 6 == 0)

cmmr/rbiom documentation built on Nov. 21, 2018, 10:04 a.m.