anyNA reports whether any missing values are present; while is.na reports missing values elementwise:
vec <- c(1, 2, 3, NA, 5)
anyNA(vec)
# [1] TRUE
is.na(vec)
# [1] FALSE FALSE FALSE TRUE FALSE
ìs.na returns a logical vector that is coerced to integer values under arithmetic operation...