[R] lm#contrasts#one level in factor: bug or feature

2004-10-12 Thread Ritter, Christian C MCIL-CTANL/S
(R.1.9.1; win2000) Since it's about the tenth time I had to write an if around this to catch the error ... Let's look at the line myfit-lm(res~groupvar,data=Data) Here res is of numeric type and groupvar is a factor. On first sight, it would be logical that if groupvar had only one

Re: [R] lm#contrasts#one level in factor: bug or feature

2004-10-12 Thread Thomas Lumley
On Tue, 12 Oct 2004, Ritter, Christian C MCIL-CTANL/S wrote: (R.1.9.1; win2000) Since it's about the tenth time I had to write an if around this to catch the error ... Let's look at the line myfit-lm(res~groupvar,data=Data) Here res is of numeric type and groupvar is a factor. On first