subsetSamples | R Documentation |
To make a transition from phyloseq
easier, the subsetSamples
and
subsetFeatures
functions are implemented. To avoid name clashes they are
named differently.
subsetSamples(x, ...)
subsetFeatures(x, ...)
subsetTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
subsetSamples(x, ...)
## S4 method for signature 'SummarizedExperiment'
subsetFeatures(x, ...)
## S4 method for signature 'SummarizedExperiment'
subsetTaxa(x, ...)
x |
a
|
... |
See |
However, the use of these functions is discouraged since subsetting using
[
works on
both dimension at the same time, is more flexible and is used throughout R to
subset data with two or more dimension. Therefore, these functions will be
removed in Bioconductor release 3.15 (April, 2022).
A subset of x
data(GlobalPatterns)
subsetSamples(GlobalPatterns, colData(GlobalPatterns)$SampleType == "Soil")
# Vector that is used to specify subset must not include NAs
subsetFeatures(GlobalPatterns, rowData(GlobalPatterns)$Phylum == "Actinobacteria" &
!is.na(rowData(GlobalPatterns)$Phylum))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.