Re: [R] Help about extracting data

2020-06-10 Thread Greg Snow
There are more than one way to do it, and it would help if you provided some sample data. But here is an example for one way to do it: examp.dat <- as.data.frame(matrix(sample(1:5, 100*6, replace=TRUE), ncol=6) tmp.count <- apply(examp.dat, 1, function(x) sum(x>=3)) examp2.dat <- examp.dat[tmp.co

[R] Help about extracting data

2020-06-10 Thread Aya Gilad
Hello, I'm analyzing a 6-question questionnaire. I need to exclude participants who answered more than 4 questions with a grade of 3 or higher. How do I write such a code? Thank you! [[alternative HTML version deleted]] __ R-help@r-project.org m