From maechler at stat.math.ethz.ch  Sat Oct 18 16:05:45 2003
From: maechler at stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Sat Oct 18 16:04:44 2003
Subject: [Rd] cor(*,  use = "pair") bug in R 1.8.0 (PR#4646)
Message-ID: <200310181405.h9IE5j0P025578@pubhealth.ku.dk>

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			<><


[Rd] cor(*, use = "pair") bug in R 1.8.0 (PR#4646)
maechler@stat.math.ethz.ch