pub trait AsFactor {
// Required method
fn as_factor(&self) -> Result<SEXP, AsCoerceError>;
}Expand description
Trait for types that can be coerced to factor via as.factor().
The result should be an R factor (integer vector with levels attribute).
Required Methods§
Sourcefn as_factor(&self) -> Result<SEXP, AsCoerceError>
fn as_factor(&self) -> Result<SEXP, AsCoerceError>
Convert to an R factor.