-3

I have a large nested List with 3 levels: the elements are data frames with the same name.

List:

[[1]]

[[1]][[1]]

[[1]][[1]][[1]]

"name1" "name2" "name3" "name4" "name5"

numeric1 numeric2 string3 string4 string5

[[1]][[1]][[2]]

"name1" "name2" "name3" "name4" "name5"

numeric1 numeric2 string3 string4 string5

[[1]][[1]][[3]]

"name1" "name2" "name3" "name4" "name5"

numeric1 numeric2 string3 string4 string5

How I can rbind all data frames to one large data frame?

manually it works this way: rbind(list[[1]][[1]][[1]], list[[1]][[1]][[2]],....)

dom
  • 29
  • 1
  • 4
  • 1
    Please provide a reproducible example. – lmo Jun 15 '16 at 18:50
  • (Why we need a reproducible example?) Because it's unclear whether your list has all of its values in the first sub-sublist of the first sublist. Might be a simple as `do.call(rbind, listName[[1]][[1]] )`, .... but maybe not. – IRTFM Jun 15 '16 at 18:53
  • 1
    @dom Take a look at this [Converting nested list to dataframe](http://stackoverflow.com/questions/26177565/converting-nested-list-to-dataframe) – akash87 Jun 15 '16 at 18:57

1 Answers1

-3

ldply(do.call("c",do.call("c",list)), data.frame)

dom
  • 29
  • 1
  • 4
  • 1
    Your answer would benefit immensely if you added some comment about what your code is doing and proof that this is indeed the correct solution. – Roman Luštrik Jun 15 '16 at 19:22