Re: [R] Department of Redundancy Department.

2008-08-15 Thread Liaw, Andy
I couldn't resist, either... From: Henrik Bengtsson Hmm, couldn't resists: X - NA is.logical(X) [1] TRUE (X == TRUE) [1] NA ==.MaybeNA - function(e1, e2) { !is.na(e1) (e1 == e2) } X - structure(NA, class=MaybeNA) is.logical(X) [1] TRUE (X == TRUE) [1] FALSE Ta da

Re: [R] Department of Redundancy Department.

2008-08-15 Thread Greg Snow
4:07 PM To: R-help Forum Subject: [R] Department of Redundancy Department. I just noticed a certain ``usage'' in a recent posting, and couldn't restrain my self from commenting. The usage was of the form ``if(X==TRUE)'' where X was a logical variable. This sort of thing

[R] Department of Redundancy Department.

2008-08-14 Thread Rolf Turner
I just noticed a certain ``usage'' in a recent posting, and couldn't restrain my self from commenting. The usage was of the form ``if(X==TRUE)'' where X was a logical variable. This sort of thing is brought to you by your Department of Redundancy Department. The ``==TRUE'' bit is

Re: [R] Department of Redundancy Department.

2008-08-14 Thread Henrik Bengtsson
Hmm, couldn't resists: X - NA is.logical(X) [1] TRUE (X == TRUE) [1] NA ==.MaybeNA - function(e1, e2) { !is.na(e1) (e1 == e2) } X - structure(NA, class=MaybeNA) is.logical(X) [1] TRUE (X == TRUE) [1] FALSE Ta da ;) Henrik PS. It might be worth mentioning base::isTRUE() when we're