Re: [Rd] sd(NA)

2007-12-03 Thread Patrick Burns
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

Re: [Rd] sd(NA)

2007-12-03 Thread Tony Plate
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

[Rd] sd(NA)

2007-12-02 Thread Wolfgang Huber
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

Re: [Rd] sd(NA)

2007-12-02 Thread Prof Brian Ripley
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),