[R] Logical Operators' inconsistent Behavior

Ramnik Bansal ramnik.bansal at gmail.com
Fri May 19 11:48:46 CEST 2017


Hi,

I need to understand the inconsistent behaviour of & and I operators when
used with NA.

The code below explains this inconsistency

> TRUE & NA
[1] NA

> FALSE & NA
[1] FALSE

> TRUE & NA
[1] NA

> FALSE | NA
[1] NA

> TRUE | NA
[1] TRUE

> TRUE == NA
[1] NA

> FALSE == NA
[1] NA

	[[alternative HTML version deleted]]



More information about the R-help mailing list