subset | R Documentation |
Subset an rbiom object by sample names or metadata.
## S3 method for class 'rbiom'
subset(biom, ..., clone = TRUE)
## S3 method for class 'rbiom'
biom[i]
biom |
An rbiom object, such as from |
... |
Passed on to |
clone |
Create a copy of |
An rbiom object.
Other transformations:
mutate()
,
rarefy()
,
rarefy_cols()
,
slice()
library(rbiom)
# Subset to specific samples
biom <- hmp50[c('HMP20', 'HMP42', 'HMP12')]
biom$metadata
# Subset according to metadata (using base::subset)
biom <- subset(hmp50, `Body Site` %in% c('Saliva') & Age < 25)
biom$metadata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.