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

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Tue, 27 Aug 2002 07:51:56 +0100 (BST)


This is correct: see the NEWS file.

Working as documented is not a bug.

On Tue, 27 Aug 2002 rsingle@zoo.uvm.edu wrote:

> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._