View source: R/FilterSamplesMultiBlock.R
| FilterSamplesMultiBlock | R Documentation |
Retain a subset of samples in a MultiBlock object.
FilterSamplesMultiBlock(MB, samples = sampleNames(MB))
MB |
A MultiBlock object. |
samples |
A vector of sample names to keep. Names not found in the MultiBlock are silently ignored; the order of the retained samples follows the order given here. |
The MultiBlock object restricted to the requested samples. The Batch and
Metadata slots are also subsetted and reordered to match.
MultiBlock, AddMetadata, ProcessMultiBlock
b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
rownames(b1) <- rownames(b2) <- paste0("sample_", 1:10)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
mb <- FilterSamplesMultiBlock(mb, samples = paste0("sample_", 1:5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.