Skip to content
Prev 388614 / 398502 Next

Converting a list to a data frame

Thanks for the tips

-----Original Message-----
From: Rui Barradas <ruipbarradas at sapo.pt> 
Sent: Saturday, July 24, 2021 11:40 AM
To: reichmanj at sbcglobal.net; R-help at r-project.org
Subject: Re: [R] Converting a list to a data frame

Hello,

This should do it:


as.data.frame(weight_chains$mcmc)


The only list member already has a dim attribute of length 2 and dimnames' 2nd member are the colnames, just coerce to df.

Hope this helps,

Rui Barradas

?s 14:18 de 24/07/21, Jeff Reichman escreveu: