There are quite a few questions apparently on this topic, but I can\'t see any general solution proposed: I have a deeply recursive list and want to flatten it into a single lis
rrapply in the rrapply package is a generalization of rapply that can flatten the nested list into a list of leaves. dfaslist=FALSE will cause data frames to be regarded as leaves rather than being recursed into.
library(rrapply)
rrapply(d, f = identity, dfaslist = FALSE, how = "flatten")