I have a list of list like the following:
alist <- list(
product1 = list(date = seq(from = 0, to = 10, by = 1),
value = seq(from = 100, to = 110, by = 1)),
product2 = list(date = seq(from = 0, to = 15, by = 1),
value = seq(from = 200, to = 215, by = 1))
)
And I need to coerce it to a tibble, where the output should be like it:
tibble(
date = seq(from = 0, to = 15, by = 1),
product1 = c(seq(from = 100, to = 110, by = 1), rep(NA,5)),
product2 = seq(from = 200, to = 215, by = 1),
)
But note that the product1 list is smaller than product2 list.
How can I do it?