Skip to content
Prev 165603 / 398513 Next

how to generalize the arguments for lm() (r-help@lists.R-project.org)

you can just use a design matrix on the right hand side of 'formula', e.g.,

factors <- matrix(rnorm(100*10), 100, 10)
y <- rnorm(100)

lm(y ~ factors)


I hope it helps.

Best,
Dimitris
Math Girl wrote: