Re: [R] Looping and actual variable names

2012-01-24 Thread Jean V Adams
Gordon, Alan wrote on 01/24/2012 09:15:31 AM: > Dear R users, > > I'm a new user to R and have a data set consisting of a number of > variables (in a data frame). I wish to carry out a regression > analysis of the first variable against all the rest in turn. I have > used the following code to

[R] Looping and actual variable names

2012-01-24 Thread Gordon, Alan
Dear R users, I'm a new user to R and have a data set consisting of a number of variables (in a data frame). I wish to carry out a regression analysis of the first variable against all the rest in turn. I have used the following code to do this dd<-read.table("for loop.txt",header=T) for (j in