selectSamples | R Documentation |
Utility function that enables quick and easy sample selection.
selectSamples(object, ...)
## S4 method for signature 'SummarizedExperiment'
selectSamples(object, ...)
object |
Object. |
... |
Selection arguments:
|
Internally, pattern matching against sample and file names is applied using logical grep matching.
Modified object. Subset (extraction) containing the desired samples.
This function is intended to be used for sample extraction from Bioconductor
container classes where the column names don't correspond to samples (e.g.
SingleCellExperiment
).
Bracket-based subsetting with [
also works on SingleCellExperiment
objects but it's not intuitive. In this case, provide cellular barcode
identifiers for columns and gene identifiers for rows.
Updated 2022-08-18.
sampleData()
.
split()
.
data(RangedSummarizedExperiment, package = "AcidTest")
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
sample <- sampleNames(object)[[1L]]
print(sample)
subset <- selectSamples(object, sampleName = sample)
print(subset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.