Utility methods for a CoreSet
object.
CoreSet-utils.Rd
Documentation for utility methods for a CoreSet
object, such as
set operations like subset and intersect. See @details for information
on different types of methods and their implementations.
Usage
# S4 method for CoreSet
subsetBySample(x, samples)
# S4 method for CoreSet
subsetByTreatment(x, treatments)
# S4 method for CoreSet
subsetByFeature(x, features, mDataTypes)
Arguments
- x
A
CoreSet
object.- samples
character()
vector of sample names. Must be valid rownames fromsampleInfo(x)
.- treatments
character()
vector of treatment names. Must be valid rownames fromtreatmentInfo(x)
. This method does not work withCoreSet
objects yet.- features
character()
vector of feature names. Must be valid feature names for a givenmDataType
- mDataTypes
character()
One or more molecular data types to to subset features by. Must be valid rownames for the selected SummarizedExperiment mDataTypes.
Details
subset methods
subsetBySample: Subset a CoreSet
object by sample identifier.
value: a
CoreSet
object containing onlysamples
.
Examples
data(clevelandSmall_cSet)
## subset methods
### subsetBySample
samples <- sampleInfo(clevelandSmall_cSet)$sampleid[seq_len(10)]
clevelandSmall_cSet_sub <- subsetBySample(clevelandSmall_cSet, samples)
## subset methods
### subsetByTreatment
#treatments <- treatmentInfo(clevelandSmall_cSet)$treatmentid[seq_len(10)]
#clevelandSmall_cSet_sub <- subsetByTreatment(clevelandSmall_cSet, treatments)
## subset methods
### subsetByFeature
features <- fNames(clevelandSmall_cSet, 'rna')[seq_len(5)]
clevelandSmall_cSet_sub <- subsetByFeature(clevelandSmall_cSet, features, 'rna')