Re: [R] the ifelse function

From: Peter Dalgaard <>
Date: Sun, 06 May 2007 10:10:35 +0200

Jennifer Dillon wrote:
> Hi Everyone,
> I think I found a problem with the ifelse function: If the condition
> argument is NA, it treats it as true. Anyone agree or disagree with this?
> Jen
I don't see it doing that:

 > ifelse(NA,1,0)
[1] NA

so what do you mean? mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 06 May 2007 - 08:20:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 May 2007 - 08:31:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.