cecilialee
2/19/2018 - 7:33 AM

Unnest nested dataframes in R

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
}