Re: [R] Odp: Loop counter used in variable

2009-12-15 Thread Petr PIKAL
Hi Martin Maechler napsal dne 15.12.2009 09:17:55: > > "PP" == Petr PIKAL > > on Tue, 15 Dec 2009 09:03:11 +0100 writes: > > PP> Hi > PP> r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: > > >> > >> Hi All, > >> > >> I need to run muliple lm

Re: [R] Odp: Loop counter used in variable

2009-12-15 Thread Martin Maechler
> "PP" == Petr PIKAL > on Tue, 15 Dec 2009 09:03:11 +0100 writes: PP> Hi PP> r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: >> >> Hi All, >> >> I need to run muliple lm functions. My independent variables are called >> dataset$x1, x2, x3,

[R] Odp: Loop counter used in variable

2009-12-15 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: > > Hi All, > > I need to run muliple lm functions. My independent variables are called > dataset$x1, x2, x3, x4 etc. > > How can I use a loop counter variable to replace the numbers? > > > > fit1=lm(dataset$y~dataset$x1) > fi