pub fn build_factor(indices: &[i32], levels: SEXP) -> SEXPExpand description
Build a factor SEXP from indices and a levels STRSXP.
The caller must keep levels rooted across this call. The factor is rooted
during construction; the returned SEXP must be protected or returned to R.