Hi everyone,
I'm trying to assign a unique ID to blocks of repeated values within a group. For instance, I have a dataset like this:
Person Activity
A B
A B
A B
A C
A B
A B
What I desire is a ID that differentiate the group of "Bs" within each Person as if they were not the same activity. Something like this:
Person Activity Unique ID
A B 1
A B 1
A B 1
A C 2
A B 3
A B 3
Anyone has suggestions?
Thank you SO MUCH!
I'm trying to assign a unique ID to blocks of repeated values within a group. For instance, I have a dataset like this:
Person Activity
A B
A B
A B
A C
A B
A B
What I desire is a ID that differentiate the group of "Bs" within each Person as if they were not the same activity. Something like this:
Person Activity Unique ID
A B 1
A B 1
A B 1
A C 2
A B 3
A B 3
Anyone has suggestions?
Thank you SO MUCH!
Comment