Unnest nested dataframes in R. #r
unnest_dataframes <- function(x) { y <- do.call(data.frame, x) if ("data.frame" %in% sapply(y, class)) unnest_dataframes(y) y }