Define the following vectors:

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)