An easy problem?
I have a txt dataset, it looks as follow:
1001 01/01/2000 xx xx
1001 02/01/2000 xx xx
1002 01/03/2000 xx xx
1002 02/04/2000 xx xx
1002 03/16/2000 xx xx
1003 01/11/2000 xx xx
1004 01/15/2000 xx xx
1004 03/10/2000 xx xx
The first column is a subject ID second column is visist date, the third and fourth column can be characters or numbers.
I want to add a new column according to the first column(ID) and second column (date) to record visit time of a subject. The results should look like follow:
1001 01/01/2000 xx xx 1
1001 02/01/2000 xx xx 2
1002 01/03/2000 xx xx 1
1002 02/04/2000 xx xx 2
1002 03/16/2000 xx xx 3
1003 01/11/2000 xx xx 1
1004 01/15/2000 xx xx 1
1004 03/10/2000 xx xx 2