Fastest way to detect if vector has at least 1 NA?

Viewed 88630

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.

6 Answers
Related