Skip to content
Prev 286452 / 398502 Next

Dealing with NAs in C

Hello,

See section 5.10.3 of the R-exts.pdf.

There are macros ISNA(x) and ISNAN(x) (only for 'double') and constants
NA_INTEGER, NA_REAL,
 NA_LOGICAL and NA_STRING.
In a C function you could use

int x;

if(x == NA_INTEGER){
    // process an integer NA
}

Hope this helps,

Rui Barradas


--
View this message in context: http://r.789695.n4.nabble.com/Dealing-with-NAs-in-C-tp4421377p4421439.html
Sent from the R help mailing list archive at Nabble.com.