[R] counts for grouped data

Paul Green pgreen at umich.edu
Thu Sep 4 19:23:11 CEST 2003


How does one get counts for grouped data
from ungrouped data. For example, how can
I get

         X1  X2  Count
         1     1      1
         1     2      2
         2     1      1
         2     2      1

from

         X1  X2
         A    A
         A    B
         B    B
         A    B
         B    A

Thanks in advance

Paul Green




More information about the R-help mailing list