Skip to main content

try_from_sexp_coerced_option_f64

Function try_from_sexp_coerced_option_f64 

Source
#[doc(hidden)]
pub fn try_from_sexp_coerced_option_f64( sexp: SEXP, ) -> Result<Option<f64>, SexpError>
Expand description

Convert a coerce Option<f64> parameter.

NULL reads None. Any other input converts as try_from_sexp_coerced_f64 does, and the NA_real_ it gives for an integer, double, or logical NA reads None. NaN stays a value, as for the bare Option<f64>.