[R] Convert a list in a dataframe
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri Oct 22 14:14:21 CEST 2004
Vito Ricci wrote:
> Hi,
>
> I've a list containing parameters (intercepts &
> coefficients) of 12 regressions fitted
>
>
>>coeff
>
> [[1]]
> (Intercept) anno
> -427017.1740 217.0588
>
> [[2]]
> (Intercept) anno
> -39625.82146 21.78025
>
> .....
>
> [[12]]
> (Intercept) anno
> 257605.0343 -129.7646
>
> I want create a data frame with two columns (intercept
> and anno)using data in these list.
coeffD <- as.data.frame(t(matrix(unlist(coeff), , 2)))
names(coeffD) <- names(coeff[[1]])
Uwe Ligges
> Any help will be appreciated.
> Best
> Vito
>
>
>
> =====
> Diventare costruttori di soluzioni
>
> "The business of the statistician is to catalyze
> the scientific learning process."
> George E. P. Box
>
>
> Visitate il portale http://www.modugno.it/
> e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list