strange result from x[x!="NA"] (PR#1952)

rsingle@zoo.uvm.edu rsingle@zoo.uvm.edu
Tue, 27 Aug 2002 02:21:29 +0200 (MET DST)


Full_Name: Richard Single
Version: 1.5.1
OS: Windows
Submission from: (NULL) (132.198.176.82)


In the latest Windows version the following syntax behaves
differently than it did in version 1.4.0: x[x!="NA"] 
The results under R 1.4.0 agree with S.

--Rich

R 1.4.0 
> x <- c(NA, 2, 3, NA)
> x == "NA"
 [1]  TRUE FALSE FALSE  TRUE
> is.na(x)
 [1]  TRUE FALSE FALSE  TRUE


R 1.5.1
> x <- c(NA, 2, 3, NA)
> x == "NA"
 [1]    NA FALSE FALSE    NA
> is.na(x)
 [1]  TRUE FALSE FALSE  TRUE


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._