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.
精彩评论