For a function that takes an argument as a list of lists of parameters,
I'd like to be able to convert that
to a data.frame and vice versa, but can't quite figure out how.
pats - list(structure(list(shape = 0, shape.col = black, shape.lty = 1,
cell.fill = white, back.fill = white, label = 1,
Try this:
pats.df - do.call(rbind, pats)
On Wed, Jul 23, 2008 at 10:23 AM, Michael Friendly [EMAIL PROTECTED] wrote:
For a function that takes an argument as a list of lists of parameters, I'd
like to be able to convert that
to a data.frame and vice versa, but can't quite figure out how.
try
?unlist
it may help
regards
+-
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059
Dear Michael,
Perhaps,
data.frame(do.call(rbind,lapply(pats,function(x) t(as.matrix(x,ncol=10)
HTH,
Jorge
On Wed, Jul 23, 2008 at 9:23 AM, Michael Friendly [EMAIL PROTECTED] wrote:
For a function that takes an argument as a list of lists of parameters, I'd
like to be able to convert
Oh, you are rigth Marc, thanks.
Another option is:
pats.df - do.call(rbind.data.frame, pats)
On Wed, Jul 23, 2008 at 1:10 PM, Marc Schwartz
[EMAIL PROTECTED] wrote:
on 07/23/2008 09:42 AM Henrique Dallazuanna wrote:
Try this:
pats.df - do.call(rbind, pats)
Henrique,
Take note of the
5 matches
Mail list logo