library(Biobase)
data(sample.ExpressionSet)
## contains Male/Female and Control/Case annotations
pData( sample.ExpressionSet)
## separate analysis of Male/Female patients
male <- ifelse( pData( sample.ExpressionSet )$type == "Control", -1, 1)
male[which( pData( sample.ExpressionSet )$sex == "Female")] <- 0
female <- ifelse( pData( sample.ExpressionSet )$type == "Control", -1, 1)
female[which( pData( sample.ExpressionSet )$sex == "Male")] <- 0
instance.matrix <- cbind( male, female)
row.names( instance.matrix ) <- sampleNames( sample.ExpressionSet )
eset_instances( instance.matrix, sample.ExpressionSet)
Run the code above in your browser using DataLab