count - Numbering/sequencing sets with same column values [R] -


exactly same question (numbering/sequencing sets of same column values) using r instead of excel.

how can create "count" column sequentially count occurrence of name in cell, based on previous occurances.

col1 col2 andy  1 chad  1 bill  1  andy  2 bill  2 bill  3 chad  2 bill  4 

i'm using r because dataset large, cannot use excel. i've used formula:

=countif($a$1:a1, a1) 

so, how port r?

thanks,


Comments