I want to check if x that is a <double> does not contain missing value. There are several options:
Rcpp::NumericVector::is_na(x)R_IsNA(x)std::isnan(x)
and others like
std::memcmp(
(char*)(&x),
(char*)(&NA_REAL),
sizeof(double)
) == 0;
What are the differences between those methods? Which one is recommended assuming that x is not a vector, so we do not need Rcpp's vectorization?