Skip to main content

AsFactor

Trait AsFactor 

Source
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§

Source

fn as_factor(&self) -> Result<SEXP, AsCoerceError>

Convert to an R factor.

Implementors§