[R] the ifelse function

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun May 6 10:10:35 CEST 2007


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?



More information about the R-help mailing list