Skip to content
Prev 43429 / 63424 Next

columnames changes behaviour of formula

P.S. It really is sloppy code to mix variables from the global
environment with those inside a data frame. I.e.:

coef(lm(d ~ -1 + (.)^2, data = x))

the only time I think it makes sense to have different objects for the
outcome and predictors are when for speed purposes, you are using a
low level function, such as lm.fit or fastLmPure from the RcppEigen
package.
On Thu, May 24, 2012 at 9:46 PM, Joshua Wiley <jwiley.psych at gmail.com> wrote: