maechler@stat.math.ethz.ch
2003-Oct-18  16:04 UTC
[Rd] cor(*, use = "pair") bug in R 1.8.0 (PR#4646)
As reported on R-help by Ming-Chung Li,
the cor() function has a new bug in R 1.8.0 when used with
matrix arguments (to give the Cor-Matrix) and the non-default	  
      use = "pairwise.complete.obs"
argument (which can be abbreviated, e.g.   to  use = "pair").
A quite minimal example is
  > x <- cbind(1:3, c(0,4,5))
  > cor(x)[1,2]
  [1] 0.9449112
  > cor(x,use="pair")[1,2]
  [1] 0.8858796
This shouldn't have happened, has been my fault, and will be fixed shortly.
Martin Maechler <maechler@stat.math.ethz.ch>
http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
