Rinternals.h could expose macros for ISNA and ISNAN for CPLXSXP
Apologies if this has been suggested before (I had a search throug the
archives and couldn't find anything).
Currently Rinternals.h includes macros for testing whether an Rboolean,
int, double, or CHARSXP are NA, and whether a double is NaN. As far as I
can tell, no such macro exists for testing whether an Rcomplex is NA or NAN.
These can simply be defined by applying the current ISNA and ISNAN macros
used for REALSXP on the real and imaginary components of the Rcomplex
struct, and could be included in either R_ext/Arith.h or R_ext/Complex.h