Suppose I have the following two lists. I want to take the first entry of list2 and combine this data frame to list1. Doing this for all entries.
data1 <- data.frame(id = 1:6,
x1 = c(5, 1, 4, 9, 1, 2),
x2 = c("A", "Y", "G", "F", "G", "Y"))
data2 <- data.frame(id = 4:9,
y1 = c(3, 3, 4, 1, 2, 9),
y2 = c("a", "x", "a", "x", "a", "x"))
l1 <- list(data1, data2)
l2 <- list(data1, data2)
What I expect as a result is one list of length 2. Each entry should be a data frame with 12 rows and 3 columns.