I have a table in R in following format :
Name Place Num
Name_A Place_1 231
Name_A Place_1 232
Name_A Place_2 233
Name_A Place_2 432
Name_A Place_2 433
Name_X Place_1 534
Name_X Place_1 535
For every Name and Place cols ,Num col is sorted and Continuous. I just want to change the Num col start from 1 and increment continously for every pair of Name and Place . Desired Output for above table :
Name Place Num
Name_A Place_1 1
Name_A Place_1 2
Name_A Place_2 1
Name_A Place_2 2
Name_A Place_2 3
Name_X Place_1 1
Name_X Place_1 2
Not here for loop soln. Any help appreciated.