[R] Counting rows given conditional
a217
ajn21 at case.edu
Thu Aug 4 14:56:09 CEST 2011
Hello,
I have an input file that contains multiple columns, but the column I'm
concerned about looks like:
"TR"
5
0
4
1
0
2
0
To count all of the rows in the column I know how to do NROW(x$TR) which
gives 7.
However, I would also like to count only the number of rows with values >=1
(i.e. not 0). I've tried NROW(x$TR>=1) which did not give the intended
output.
Do any of you have any suggestions as to where I'm going wrong?
--
View this message in context: http://r.789695.n4.nabble.com/Counting-rows-given-conditional-tp3718541p3718541.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list