[R] Covariance bug in R-1.8.0

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Nov 5 09:32:45 CET 2004


lederer at trium.de writes:

> R-1.8.0 seems to calculate wrong covariances, when the argument of cov()
> is a matrix or a data frame.
> The following should produce a matrix of zeroes and NaNs:
...
> Under 1.9.1 (Linux) and 1.9.0 (Windows) i get the expected matrix of
> zeroes and NaNs.
> 
> This example is not very special. Under R-1.8.0 cov produced wrong result
> for any random matrix i tried.

Presumably, this is the same as PR#4646. 

> Doesn't this mean, that *any* result obtained under R 1.8.0 is unreliable?

It means that covariances and correlations are sometimes computed
incorrectly.

> By the way, i just recompiled R-1.8.0 from source under Linux and tried
> 'make check'. All tests were ok.

Yes. We don't release versions that don't pass their own tests.

> Does there exist a more detailed set of tests, which could insure that
> at least the most basic R functions work correctly?

We add regression tests as we discover and fix bugs. We can't fix old
versions retroactively though, we release patch versions (e.g. 1.8.1)
instead.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list