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
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
2 matches
Mail list logo