What is the fastest way to detect if a vector has at least 1 NA
in R? I've been using:
sum( is.na( data ) ) > 0
But that requires examining each element, coercion, and the sum function.
I'm thinking:
any(is.na(data))
should be slightly faster.