I have a list which contains list entries, and I need to transpose the structure. The original structure is rectangular, but the names in the sub-lists do not match.
The purrr package now makes this process really easy:
purrr
library(purrr) before %>% transpose() ## $x ## $x$a ## a x ## 1 1 2 ## ## $x$b ## b w ## 1 5 6 ## ## ## $y ## $y$a ## a y ## 1 3 4 ## ## $y$b ## b z ## 1 7 8