I have data of tourism interactions with individually identified whales, where I have the whale ID, date of encounter and time of encounter
Id Date Time
A 20110527 10:42
A 20110527 11:24
A 20110527 11:52
A 20110603 10:29
A 20110603 10:59
B 20110503 11:23
B 20110503 11:45
B 20110503 12:05
B 20110503 12:17
I would now like to add to additional columns that label the day of each encounter for each individual and the number of encounters within that day as follows:
Id Date Time Day Encounter
A 20110527 10:42 1 1
A 20110527 11:24 1 2
A 20110527 11:52 1 3
A 20110603 10:29 2 1
A 20110603 10:59 2 2
B 20110503 11:23 1 1
B 20110503 11:45 1 2
B 20110503 12:05 1 3
B 20110503 12:17 1 4
Is this possible? Any help would be greatly appreciated!