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, NA), na.rm = TRUE)

Error in var(x, na.rm = na.rm) : paires d'éléments incomplètes

 

We are actually wondering if it is a bug to report, or if we have to manage it 
in our own R scripts.

 

Thanks a lot, best regards,

 

Laetitia

 







************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to