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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to