Filter by multiple columns above count threshold in R
So I'm having a brain cramp and I think I'm over thinking it. I'm doing an RNA-seq experiment and want to filter my counts table by if at least four columns have above 20 counts. Any clue how to do this? The function I wrote takes way too long and there has got to be an easier way.
• 3,069 views
•
link
1 answer
mycounts[rowSums(mycounts >= 20) >= 4, ]
• 0 views
•
link
Log in to answer this question.
So, what have you tried? It would be more useful for learning process if you show your efforts and thinking process.