Re: [R] Multiple left hand side variables in a formula

2013-03-02 Thread Frank Harrell
Hi Gabor, This is not for a regression function but for a major update I'm working on for the summary.formula function in the Hmisc package. So I need to handle several data types in the formula. Thanks Frank Gabor Grothendieck wrote >> Gabor Grothendieck wrote >>> On Fri, Mar 1, 2013 at 7:16 P

Re: [R] Multiple left hand side variables in a formula

2013-03-02 Thread Frank Harrell
Achim this is perfect. I had not seen Formula before. Thanks for writing it! Frank Achim Zeileis-4 wrote > On Fri, 1 Mar 2013, Frank Harrell wrote: > >> Thank you Bill. A temporary re-arrangement of the formula will allow me >> to >> do the usual subset= na.action= processing afterwards. Nice

Re: [R] Multiple left hand side variables in a formula

2013-03-02 Thread Achim Zeileis
On Fri, 1 Mar 2013, Frank Harrell wrote: Thank you Bill. A temporary re-arrangement of the formula will allow me to do the usual subset= na.action= processing afterwards. Nice idea. I don't need the dot notation very often for this application. That's what the "Formula" package provides. It

Re: [R] Multiple left hand side variables in a formula

2013-03-01 Thread Gabor Grothendieck
> Gabor Grothendieck wrote >> On Fri, Mar 1, 2013 at 7:16 PM, Frank Harrell < > >> f.harrell@ > >> > wrote: >>> The lattice package uses special logic to allow for multiple >>> left-hand-side >>> variables in a formula, e.g. y1 + y2 ~ x. Is there an elegant way to do >>> this outside of lattice?

Re: [R] Multiple left hand side variables in a formula

2013-03-01 Thread Frank Harrell
Thank you Bill. A temporary re-arrangement of the formula will allow me to do the usual subset= na.action= processing afterwards. Nice idea. I don't need the dot notation very often for this application. Frank William Dunlap wrote > I don't know how much of the information that model.frame supp

Re: [R] Multiple left hand side variables in a formula

2013-03-01 Thread Frank Harrell
Thanks for your reply Gabor. That doesn't handle a mixture of factor and numeric variables on the left hand side. Frank Gabor Grothendieck wrote > On Fri, Mar 1, 2013 at 7:16 PM, Frank Harrell < > f.harrell@ > > wrote: >> The lattice package uses special logic to allow for multiple >> left-hand

Re: [R] Multiple left hand side variables in a formula

2013-03-01 Thread William Dunlap
I don't know how much of the information that model.frame supplies you need, but you could make a data.frame containing all the variables on both sides of them formula by changing lhs~rhs into ~lhs+rsh before calling model.frame. E.g., f <- function (formula) { if (length(formula) == 3) { #

Re: [R] Multiple left hand side variables in a formula

2013-03-01 Thread Gabor Grothendieck
On Fri, Mar 1, 2013 at 7:16 PM, Frank Harrell wrote: > The lattice package uses special logic to allow for multiple left-hand-side > variables in a formula, e.g. y1 + y2 ~ x. Is there an elegant way to do > this outside of lattice? I'm trying to implement a data summarization > function that log