In the previous versions of R (2.6.1), when a vector of NA was given to the
functions 'sd' or 'var' with parameter na.rm = TRUE, it used to return NA. Now
(2.7.1) it returns an ERROR :
Example in 2.6.1:
> sd(c(NA, NA, NA, NA), na.rm = TRUE)
[1] NA
Example in 2.7.1:
> sd(c(NA, NA, NA,
There was a bug in 2.6.1 which has since been corrected: there is no need
to report corrected bugs in obsolete versions. Two different ways to
compute the sd of a zero-length vector gave different answers.
This is covered by the following NEWS item for 2.7.0 (version from
R-patched)
o
2 matches
Mail list logo