I have a column of ordered values in a data frame, what I need to do is create a new column with the number of times this value has occured.
Heres an example of my data:
5561
5561
5681
5681
5521
5521
5521
5521
5521
What I need
5561 1
5561 2
5681 1
5681 2
5521 1
5521 2
5521 3
5521 4
5521 5