Skip to main content

build_factor

Function build_factor 

Source
pub fn build_factor(indices: &[i32], levels: SEXP) -> SEXP
Expand 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.