[R] count element in column

Frederic renaud fren2 at yahoo.com
Wed Jan 5 17:07:34 CET 2005


Hi,
I 've a matrix n*1 (thus a column) and I would like to
count the number of negative element inside.
Can you help me?
Thanks!

eg:
 res[,1]= 1
          -3
          -1

How obtain the number 2 (number of negative-element)?




More information about the R-help mailing list