- Code: Select all
AOU_Code AnimalID StartYear CaptureHistory Gender Trap_Number
5203 PETR 004 2004 1011 F D4
10931 PEMA 004 2004 1011 F G3
11520 PETR 004 2004 1011 F E5
3942 PEMA 005 2004 1000 F D1
2861 PETR 006 2004 1111 M A5
4353 PEMA 006 2004 1111 M D6
Now I need to switch to a line based capture history where each individual capture occasion is represented by a line.
- Code: Select all
AOU_Code AnimalID StartYear CaptureHistory Gender Trap_Number occasion
5203 PETR 004 2004 1011 F D4 1
10931 PEMA 004 2004 1011 F G3 3
11520 PETR 004 2004 1011 F E5 4
3942 PEMA 005 2004 1000 F D1 1
2861 PETR 006 2004 1111 M A5 1
4353 PEMA 006 2004 1111 M D6 2
I'm hoping that I don't have to add the capture occasion line by line in Excel since I have nearly 6,000 captures. Are there some strategies or R code for adding the capture occasion to these data?
Thank you.