开发者

ExpressionSet (ESet) delete entry with NA

I am try to exclude all my sample out of a ESet which have for a one of 10 phenotype no entry开发者_如何学Python:

I have a ESet with 50 samples and 10 phenotypes. Sample A has NA in Phenotype 1 and Sampe B in Phenotype 3. So I want to delete A and B in my ESet.

I try: apply(ESest@pData@data,1,function(i){if(is.na(i)){???}}

Sorry But I have no idea ;(


As said last time, please use the correct getter and setter methods to get to the data you want. In this case, it would be :

ESet[rowSums(is.na(pData(ESet)))==0,]

pData() gives you the dataframe with phenodata, and with the condition you check whether any of the rows in the pData dataframe contains an NA.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜