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?
__
Can you proovide the example you are talking about. Here is what I got:
> ifelse(NA,1,2)
[1] NA
On 5/5/07, Jennifer Dillon <[EMAIL PROTECTED]> 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
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?
I disagree.
> ifelse(c(5,4,NA) == 5, 1, 0)
[1] 1 0 NA
> Jen
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 We
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
--
Jennifer Dillon
Doctoral Student
Harvard Biostatistics
Room 414B, Building 1
[[alternative HTML version deleted]]
__