Define the following vectors:
true_and_missing
with the values TRUE
and NA
false_and_missing
with the values FALSE
and NA
mixed
with the values TRUE
, FALSE
and NA
Apply the functions any()
and all()
to each of your vectors and call the resulting objects true_and_missing_any
, false_and_missing_all
etc.
(from: Cotton, 2013, Learning R, O’Reilly)