Re: [R] defining set of variables in a formula

2010-09-22 Thread Ivan Calandra
Hi, Try with ".": model<- lm(y~., data=data) From ?formula: "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

Re: [R] defining set of variables in a formula

2010-09-22 Thread Erik Iverson
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

[R] defining set of variables in a formula

2010-09-22 Thread Ozlem Yanmaz
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 ad