ISNA.Rd
Checks if a Value is NA, NaN, or Finite
ISNA(x)
Declaration: src/include/R_ext/Arith.h via src/include/R.h
Implementation: Functions R_IsNA(double x)
, R_IsNaN(double x)
, and R_finite(double x)
are implemented in src/main/arithmetic.c
(double) An scalar double.
(integer) 0 ("false") or 1 ("true").
NaN | NA | |
C API: | ||
ISNAN() | true | true |
ISNA() | false | true |
R_IsNaN() | true | false |
R_IsNA() | false | true |
R API: | ||
is.na() | TRUE | TRUE |
is.nan() | TRUE | FALSE |
#include <R.h>
int R_IsNA(double);
int R_IsNaN(double);
int R_finite(double);
#define ISNA(x) R_IsNA(x)
#ifdef __cplusplus
int R_isnancpp(double); /* in arithmetic.c */
# define ISNAN(x) R_isnancpp(x)
#else
# define ISNAN(x) (isnan(x)!=0)
#endif
#ifdef HAVE_WORKING_ISFINITE
/* isfinite is defined in <math.h> according to C99 */
# define R_FINITE(x) isfinite(x)
#else
# define R_FINITE(x) R_finite(x)
#endif