fn factor_groups(column: SEXP) -> Vec<(GroupKey, Vec<usize>)>
Factor fast path: levels are the keys (level order, empty levels kept). NA codes — and a literal NA level from addNA() — land in GroupKey::Na.
addNA()
GroupKey::Na