This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filtering NA from MethyLumiSet

I have MethyLumiSet object which has some NA

sumis.na(exprs(infdata)))

[1] 3822

Now how do I remove NA's from it and keep the same MethyLumiSet class for the result? I thought of something like:

exprs(infdata) <- exprs(infdata)[!is.na(exprs(infdata))]

but I'm not sure whether this is the correct way.

r

Isn't it the case that infdata is of class MethyLumiSet while exprs(infdata) is not? You might be working with a 2D structure like a matrix or data.frame, which would make your life simpler.

Yes you're right, I was wondering if there's a way to filter the MethyLumiSet itself without filtering just the m-values. I need MethyLumiSet later on.

Well, the MethyLumiSet seems to be a list of 2D data structures, so filtering the list doesn't make sense. You may need to create a copy of the list and then filter each 2D component of the new list.

0 answers

No answers yet.

Log in to answer this question.