Description Usage Arguments Value See Also Examples
Reduce samples to a specific list
1 |
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 |
nTop |
Selects this number of samples, taking the sample with the most
observations first, then the sample with the second-most observations,
etc. If |
nRandom |
Randomly selects this number of samples. If higher than the number of samples in the dataset, the entire dataset will be returned. See note. |
seed |
Random seed, used when selecting Note: Generally, you will specify only one of the filters: |
A BIOM
object.
1 2 3 4 5 6 7 8 9 10 11 | library(rbiom)
infile <- system.file("extdata", "hmp50.bz2", 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)
ex4 <- select(biom, nRandom = 10)
ex5 <- select(biom, nTop = 5)
ex6 <- select(biom, samples = 10:40, nTop = 20, nRandom = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.