My goal is to take a nested list as such:
list1 <- list(1,2,3,4,5)
list2 <- list(6,7,8,9,10)
list3 <- list(11,12,13,14,15)
nested_list <- list(list1, list2, list3)
and create a dataframe with the number of columns = number of lists embedded in the nested list. In other words, I am trying to get list1, list2, and list3 all placed into separate columns of a data frame.
I have tried using some functions from tidyr such as "unnest_wider" but haven't had much luck. Most functions out there are built to turn each nested list into an observation (row), not columns. I know I could run some sort of loop to do this, but that approach isn't very efficient.