pub(crate) fn factor_vec_from_sexp<T: UnitEnumFactor>( sexp: SEXP, ) -> Result<Vec<T>, SexpError>
Convert an R factor SEXP to a Vec of enum values. Every NA and every code outside the levels is reported, with its position.
NA