I am using R.2.4.1 on Windows XP 5.1 (SP 2). I have the following line in my R code.
Analysis=anova(lm(PM ~ x)) It works the first 60 or so times it is called but then I get the following error message. Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases In order to examine the input, I preceeded the call with the following. print(PM) print(x) This gave the following. [1] 245.0 189.0 249.8 188.0 184.3 230.0 147.0 185.3 196.0 142.3 282.0 169.0 [13] 231.5 162.0 115.0 168.8 195.0 214.0 173.0 111.3 360.0 192.3 305.5 206.0 [25] 111.0 247.0 188.0 246.0 252.0 114.0 [1] 20.00 20.00 20.00 20.00 20.00 10.00 10.00 10.00 10.00 10.00 7.50 7.50 [13] 7.50 7.50 7.50 5.00 5.00 5.00 5.00 5.00 2.50 2.50 2.50 2.50 [25] 2.50 1.25 1.25 1.25 1.25 1.25 I would be most grateful if someone could help with this problem. I do not see why these input vectors would give this error message. Also, is there a way to make it so the script keeps running if it gets an error like this? Many thanks in advance, Peter Lauren. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.