[R] Count all dataset

Jan Sabee jan.sabee at gmail.com
Fri Mar 18 23:18:22 CET 2005


Dear all R member,

I have a dataset which looks like:

 x1     x2 . . . x250
  A     A           C
  A     C           C
  A     A           A
  A     A        <NA>
  B     B           B
<NA> C           B
...
more 2000 rows.

I need count all dataset at the following:

A       = sum of A
B       = sum of B
C       = sum of C
<NA> = sum of <NA>

What function can I use?
I'm just a beginner in R programming.

Best regards,
Jan Sabee




More information about the R-help mailing list