> No, simply access the components you want to get and put then into a
> data.frame.
>
> Let's make a nonsense lm() example that is reproducible for me:
>
>  result <- lapply(1:10, function(i){
>    x <- rnorm(10)
>    y <- rnorm(10)
>    lm(y~x)
>  })
>
> result
>
> Now you want to get the coefficients by applying the indexing function
> "[[" with argument "coefficients" (names of the corresposning element of
> the returned list) to the object result:
>
>  sapply(result, "[[", "coefficients")
>
> (in this particular case one would take the extractor function
> coefficients() instead, but this one was for demonstration purposes).

I have not personally tried it, but there is a wonderful explanation of this 
kind of functionality at
http://wiki.r-project.org/rwiki/doku.php?id=tips:stats-models:extr_regr_sum

It appears to have been added to the Wiki the day we were having this 
discussion.

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to