Ozlem,

Just read ?formula, where it says:

     There are two special interpretations of ‘.’ in a formula.  The
     usual one is in the context of a ‘data’ argument of model fitting
     functions and means ‘all columns not otherwise in the formula’:
     see ‘terms.formula’.  In the context of ‘update.formula’, *only*,
     it means ‘what was previously in this part of the formula’.

So,

lm(y ~ . , data = data)

But what do you hope to conclude from an analysis with thousands
of dependent variables?

Ozlem Yanmaz wrote:
Dear fellow R users,

I am trying to conduct a regression analysis. I have thousands of
variables. The names are V1, V2,........V2000
Is there an easy way to include these variables in the regression?
my model is something like that:

model<- lm(y~V1+V2+.....+V2000, data=data)

Thanks so much in advance,

Ozlem

______________________________________________
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.

______________________________________________
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.

Reply via email to