Skip to main content

checked_vec_option_try_from_sexp_numeric

Function checked_vec_option_try_from_sexp_numeric 

Source
fn checked_vec_option_try_from_sexp_numeric<T>(
    sexp: SEXP,
    param: &str,
) -> Vec<Option<T>>
where i32: TryCoerce<T>, f64: TryCoerce<T>, <i32 as TryCoerce<T>>::Error: Debug, <f64 as TryCoerce<T>>::Error: Debug,
Expand description

Generic strict Vec<Option<T>> conversion: only INTSXP and REALSXP allowed.

Mirrors checked_vec_try_from_sexp_numeric but maps R’s NA sentinel (NA_INTEGER for INTSXP, NA_REAL for REALSXP) to None instead of erroring — missingness is orthogonal to the input-type gate.