On 4/20/05, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Wed, 20 Apr 2005 [EMAIL PROTECTED] wrote:
>
> > I'm trying to manipulate/change a formula prior to passing it to another
> > function. A simplified example:
> >
> > User passes formula to my function: y~x
> > My function does: lm(transform
Hi,
Formulas (and other language objects) can be manipulated to some
extent like lists (see the R Language Definition). A formula
corresponds to a 3-element list, where the first argument is the
function `~`, and the next two are the LHS and RHS of the formula,
respectively (for unary use of ~, t
On Wed, 20 Apr 2005 [EMAIL PROTECTED] wrote:
I'm trying to manipulate/change a formula prior to passing it to another
function. A simplified example:
User passes formula to my function: y~x
My function does: lm(transform(y)~x)
Here, transform() is added to the model's response.
What is the best wa
I'm trying to manipulate/change a formula prior to passing it to another
function. A simplified example:
User passes formula to my function: y~x
My function does: lm(transform(y)~x)
Here, transform() is added to the model's response.
What is the best way to accomplish this?
___