I like the 2.6.x behaviour better. Consider:
x - array(1:30), c(10,3))
x[,1] - NA
x[-1,2] - NA
x[1,3] - NA
sd(x, na.rm=TRUE)
# 2.7.0
Error in var(x, na.rm = na.rm) : no complete element pairs
# 2.6.x
[1] NA NA 2.738613
The reason to put 'na.rm=TRUE' into the call is to avoid
I also prefer the old behavior. The old behavior of sd (return NA
rather than stop with an error) is nicer when one is working with any
kind of resampling technique. If there are some NA's in the data, then
one can happily debug with a small or medium number of samples, and
only when running
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
On Sun, 2 Dec 2007, Wolfgang Huber wrote:
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),