Skip to content
Prev 248161 / 398525 Next

Passing in arguments into function

Hi,

If you have the formula stored in a string, you could also use 
as.formula in your call to lm, like this:
form <- "x ~ y + z"
lm(as.formula(form))

HTH,
Ivan


Le 1/23/2011 21:38, Joshua Wiley a ?crit :