I've got a list of 10 with 2 columns for each element. One is the year (2001-2018) and the other the observation. For the first and second object are some years missing (so there lenght is only 14 or 16 instead of 18), the others are complete (length of 18).
My list:
list <- (A, B, C, D)
A = data.frame (Year = c(2001, 2003), Observ = c(1,3)
B = data.frame (Year = c(2002, 2003, 2018), Observ = c(2,8,3)
C = data.frame (Year = c(2001, 2002, 2003, ..., 2018), Observ = c(4,3,2,5)
D = data.frame (Year = c(2001, 2002, 2003, ..., 2018), Observ = c(17,1, 11, 2)
I would like to generate a dataframe looking like the following:
#Year Obser1 Obser2 Obser3 ... Obser10
#2001 1 NA 4 17
#2002 NA 2 3 1
#2003 3 8 2 11
#...
#2018 NA 3 5 2