From huber at ebi.ac.uk  Sun Dec  2 18:38:06 2007
From: huber at ebi.ac.uk (Wolfgang Huber)
Date: Sun, 02 Dec 2007 17:38:06 +0000
Subject: [Rd] sd(NA)
Message-ID: <4752ED7E.1010700@ebi.ac.uk>

Dear Prof. Ripley

I noted a change in the behaviour of "cov", which is very reasonable:

## R version 2.7.0 Under development (unstable) (2007-11-30 r43565)
 >  cov(as.numeric(NA), as.numeric(NA), use="complete.obs")
Error in cov(as.numeric(NA), as.numeric(NA), use = "complete.obs") :
   no complete element pairs

whereas earlier behavior was, for example:
## R version 2.6.0 Patched (2007-10-23 r43258)
 > cov(as.numeric(NA), as.numeric(NA), use="complete.obs")
[1] NA


I wanted to ask whether the effect this has on "sd" is desired:

## R version 2.7.0 Under development (unstable) (2007-11-30 r43565)
 > sd(NA, na.rm=TRUE)
Error in var(x, na.rm = na.rm) : no complete element pairs

## R version 2.6.0 Patched (2007-10-23 r43258)
 >  sd(NA, na.rm=TRUE)
[1] NA



Best wishes
   Wolfgang Huber

------------------------------------------------------------------
Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber



[Rd] sd(NA)
Wolfgang Huber