<- c("111", "111", "112", "112", "112",
id "114", "315", "315", "315", "539")
<- c("male", "male", "female", "female", "female",
gender "female", "male", "male", "male", "female")
<- c(56, 58, 29, 31, 33,
age NA, 86, 88, 90, NA)
<- c(1000, 2500, NA, 400, 540,
income 200, 440, NA, NA, 300)
<- c(2012, 2014, 2012, 2014, 2016,
year 2016, 2012, 2014, 2016, 2016)
<- data.frame(id, gender, age, income, year)
survey
survey
id gender age income year
1 111 male 56 1000 2012
2 111 male 58 2500 2014
3 112 female 29 NA 2012
4 112 female 31 400 2014
5 112 female 33 540 2016
6 114 female NA 200 2016
7 315 male 86 440 2012
8 315 male 88 NA 2014
9 315 male 90 NA 2016
10 539 female NA 300 2016