Skip to main content

read_factor_labels

Function read_factor_labels 

Source
fn read_factor_labels(sexp: SEXP) -> Result<Vec<Option<f64>>, SexpError>
Expand description

Read a factor by its labels: each level is parsed once, then every code looks its level up. Code NA is None; a code outside the levels is a malformed factor (R’s as.character() refuses it too).