I have a bunch of lists containing lists within them (generalised linear model output). I want to write a function which will extract several elements from each list and then combine the results into a data frame.
I want to extract modelset[[1]]$likelihood
& modelset[[1]]$fixef
, modelset[[2]]$likelihood
& modelset[[2]]$fixef
, etc, and combine the results into a data frame.
Can someone give me an idea of how to do this?
Apologies if my question is confusing: what I am trying to do is beyond my limited programming understanding.
Further information about my list:
modelset: Large list (16 elements, 7.3Mb)
:List of 29
..$ fixef : Named num [1:2] -1.236 -0.611
.. ..- attr(*, "names")= chr [1:2] "(Intercept)" "SMIstd"
..$ likelihood :List of 4
.. ..$ hlik: num 238
.. ..$ pvh : num 256
.. ..$ pbvh: num 260
.. ..$ cAIC: num 567
...etc