I have requirement for sequence generation in R, but it needs to be unique in combination with another field. For example, my data:
GrpID Data NewSeqId
100 683 1
100 534 2
100 234 3
200 456 1
200 23 2
200 634 3
So my data contains GrpID and Data, i need the NewSeqID generated as per the above shown pattern. It should start from 1 for every unique GrpID. Any ideas on how to get this done in R??