-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]],....)

3
  • 1
    Please provide a reproducible example. Commented Jun 15, 2016 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. Commented Jun 15, 2016 at 18:53
  • 1
    @dom Take a look at this Converting nested list to dataframe Commented Jun 15, 2016 at 18:57

1 Answer 1

-3

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.