问题
I have an ExpressionSet
object that I want to subset. For example,
> str(ESet)
Formal class 'ExpressionSet' [package "Biobase"] ..
..@ assayData :..
..@ phenoData :
.. .. .. ..$ STATUS : num [1:210] 1 1 1 1 1 1 1 1 1 1 ...
....
I want to extract a subset where STATUS==0
. I've tried:
exprs(ESet@phenoData$STATUS==0)
but it does not work.
回答1:
You are almost there. Guessing at your data structure, I think the following should work:
exprs(ESet)[ESet@phenoData$STATUS==0,]
If you look at this paper, there are lots of examples of sub-setting the data depending on strain and time. I should admit that I'm an author on this paper.
来源:https://stackoverflow.com/questions/5593931/expressionset-subsetting