Learn R Programming

mRMRe (version 2.1.2.1)

sampleStrata: Accessor function for the 'sampleStrata' information in a mRMRe.Data object

Description

The sampleStrata vector consists of a sampling stratification that will be used in computing mutual information between features. If known batch effects or sample stratification is present between samples, identify such subsets using this.

Usage

# S4 method for mRMRe.Data
sampleStrata(object)
# S4 method for mRMRe.Data
sampleStrata(object) <- value

Arguments

object

a mRMRe.Data object.

value

a factor vector identifying the stratification of samples.

Author

Nicolas De Jay, Simon Papillon-Cavanagh, Benjamin Haibe-Kains

Examples

Run this code
set.thread.count(2)
data(cgps)
feature_data <- mRMR.data(data = data.frame(cgps.ge))

# No stratification (default)
sampleStrata(feature_data)

# Random stratification 
sampleStrata(feature_data) <- as.factor(sample(c(0,1), 
  sampleCount(feature_data), replace=TRUE))
# Show result
sampleStrata(feature_data)

Run the code above in your browser using DataLab