Re: [R] RE: more on lm(y~x) question: removing NA´s

2004-05-04 Thread Thomas Lumley
On Tue, 4 May 2004, Liaw, Andy wrote: 1. If your code actually runs, you should upgrade R, and quit using `_' for assignment... 8-) 2. You seem to have an extraneous `]' after the na.exclude. Could that be the problem? More seriously, the for() loop over k will mess up the value of k that

Re: [R] RE: more on lm(y~x) question: removing NA´s

2004-05-04 Thread Christoph Scherber
it all works fine (the regression lines fit correctly to the data) as long as there are not both missing values in j and k. What suggestions would you have for this? Or, more precisely, how would you create multiple graphs from subsequent columns of a data.frame? Thomas Lumley wrote: On Tue,

Re: Re: [R] RE: more on lm(y~x) question: removing NA´s

2004-05-04 Thread Thomas Lumley
On Tue, 4 May 2004, Christoph Scherber wrote: it all works fine (the regression lines fit correctly to the data) as long as there are not both missing values in j and k. That's very strange. The lines for (k in 1:length(foranalysis[93:174,i]))

Re: [R] RE: more on lm(y~x) question: removing NA´s

2004-05-04 Thread Christoph Scherber
Great!!! This works, many thanks! ** using lsfit(x,y) instead of lm(y~x) produces a perfectly correct output. *** Thomas Lumley wrote: On Tue, 4 May 2004, Christoph Scherber wrote: it all works fine (the regression lines fit correctly to the data) as long as there are