powered by
Utility to coerce a value into numeric (double), returning NA_real_ if input is NULL or NA.
double
NA_real_
NULL
NA
whapi_to_num(x)
A numeric scalar (double) or NA_real_.
Any R object (usually scalar).
whapi_to_num("123") whapi_to_num(NULL) # NA_real_
Run the code above in your browser using DataLab