Reputation: 11
I have a list object (results) and am trying to compact it in a tidy data frame. But I am not sure how to achieve that.
[[varying from 1to 3nsim][[varying from 1 to 9]][[varying from 1to 3]][[varying from 1to 3]]
I have such nested list and I want to compact it into a tidy data frame of dimension nrow =nsimx9x3x3 et ncol = 26 . any idea how to achieve it?
Thanks in advance
Upvotes: 0
Views: 192
Reputation: 101014
Since you have nsimx9x3x3
rows (but I have no clue how you get 26
columns), maybe this could work for you
as.data.frame(t(as.data.frame(lst)))
where lst
is your nested list
Upvotes: 0