Hi: On the off chance that your 9860 explanatory variables do not completely take up the 'non-y' part of your data frame, you can always write a formula string to pass to the model function. For example, form <- paste('y ~ ', paste('x', 1:10, sep = '', collapse = ' + ')) > form [1] "y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10" m <- lm(form, data = df)
HTH, Dennis On Wed, May 26, 2010 at 9:58 PM, Eric Fail <e...@it.dk> wrote: > Hi Ruser > > As so usual I'm trying to replicate some SAS code. I wold like to know if > there is a wildcard operators, as " : " in SAS, in R? > > When running: > > lm(y ~ x1 + x2 + x3 + x4 + x5 + x6 .... x9860, data=mydata) > > I would like to be able to get around it by just writing something like > this: > > lm(y ~ x1:x9860, data=mydata) > > Anyone? > > Sorry for no including a working example, but I figured that it wasn't > necessary. > > Thanks > > Eric > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.