Skip to content
Prev 248125 / 398525 Next

Passing formula as an agrument

Hi Tim,

I already answered this exact question from a different poster (by the
name of Paul Evans, subject: "Passing in arguments into function"),
that occurred within marvelous temporal proximity to your own, so I
will just refer you to that (search the archives with name + subject).

Just as a note, diff() is a function, so it is probably best to give
the variable you store the results of a call to lm() in a different
name, even if it is trivially different:

diff1 <- lm(x ~ y + z)

It can help to prevent future confusion and headache.

Cheers,

Josh
On Sun, Jan 23, 2011 at 8:44 AM, Tim Smith <tim_smith_666 at yahoo.com> wrote: