compact list object in a tidy dataframe R

177 Views Asked by At

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

1

There are 1 best solutions below

3
On

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