aggregate over several variables in r

Posted by Misha on Stack Overflow See other posts from Stack Overflow or by Misha
Published on 2010-05-11T21:24:34Z Indexed on 2010/05/11 22:44 UTC
Read the original article Hit count: 230

Filed under:
|
|

Dear overflowers,

I have a rather large dataset in a long format where I need to count the number of instances of the ID due to two different variables, A & B. E.g. The same person can be represented in multiple rows due to either A or B. What I need to do is to count the number of instances of ID which is not too hard, but also count the number of ID due to A and B and return these as variables in the dataset.

Regards,

//Mi

© Stack Overflow or respective owner

Related posts about aggregate

Related posts about reshape