Re: [R] converting a list of loglin terms to a model formula

2013-07-05 Thread William Dunlap
dunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Michael Friendly > Sent: Friday, July 05, 2013 12:21 PM > To: Henrique Dallazuanna > Cc: R-help > Subject: Re: [R] converting a list of

Re: [R] converting a list of loglin terms to a model formula

2013-07-05 Thread Michael Friendly
On 7/3/2013 6:38 PM, Henrique Dallazuanna wrote: > Try this: > > as.formula(sprintf(" ~ %s", do.call(paste, c(lapply(mutual(3), paste, > collapse = ":"), sep = "+" > Thanks for this. I encapsulated this as a function, loglin2formula() and a related function, loglin2string() to give a chara

Re: [R] converting a list of loglin terms to a model formula

2013-07-03 Thread Henrique Dallazuanna
Try this: as.formula(sprintf(" ~ %s", do.call(paste, c(lapply(mutual(3), paste, collapse = ":"), sep = "+" On Wed, Jul 3, 2013 at 6:55 PM, Michael Friendly wrote: > I'm developing some functions to create symbolic specifications for > loglinear models of different types. > I don't really

[R] converting a list of loglin terms to a model formula

2013-07-03 Thread Michael Friendly
I'm developing some functions to create symbolic specifications for loglinear models of different types. I don't really know how to 'compute' with model formulas, so I've done this in the notation for stats::loglin(), which is a list of high-order terms in the model. What I'd like is a function