I have this dataframe :
year = c(rep(1998,4),rep(2000,5),rep(2002,2),rep(2004,2)) gift = c(0,0,0,0,1,0,1,1,0,0,0,1,0) type = c("L","L","L