Skip to content

How to use a sequence of covariates in linear model (lm)?

3 messages · Michael, R. Michael Weylandt, Joshua Wiley

#
Usually that's what the dot in a formula is used for.

E.g.,

data(iris)
str(iris)
lm(Petal.Width ~ ., data = iris)

Michael
On Fri, Feb 3, 2012 at 10:45 AM, michael <tufemichael at gmail.com> wrote:
#
Or pass the covariates as a matrix.  See ?lm for details.
On Feb 3, 2012, at 7:51, "R. Michael Weylandt" <michael.weylandt at gmail.com> wrote: