I have this data frame:
df<- data.frame(j = c("a", "a", "b", "b", "c", "c"),
t = c(2000,2010,2000,2010,2000,2010))
> df
j t
1 a 2000
2 a 2010
3 b 2000
4 b 2010
5 c 2000
6 c 2010
I am trying to create an indicator jt
to identify the country/year:
j t jt
1 a 2000 1
2 a 2010 2
3 b 2000 3
4 b 2010 4
5 c 2000 5
6 c 2010 6
7 c 2010 6
8 c 2010 6
The last two observations signal that I can have multiple occurrences.