I cannot understand the properties of logical (boolean) values TRUE
, FALSE
and NA
when used with logical OR (|
) and logical AND (&
). Here are some examples:
NA | TRUE
# [1] TRUE
NA | FALSE
# [1] NA
NA & TRUE
# [1] NA
NA & FALSE
# [1] FALSE
Can you explain these outputs?