i_to_base_class {ilabelled} | R Documentation |
remove class i_labelled and return base R class
Description
- when value labels for all values are available will return factor
- when value labels are missing will unclass i_labelled
- remove class i_labelled and return variable as base R class
Usage
i_to_base_class(
x,
missing_to_na = TRUE,
as_factor = TRUE,
keep_attributes = FALSE
)
Arguments
x |
vector or data.frame |
missing_to_na |
missing values will become regular NA |
as_factor |
convert to factor when value labels are available |
keep_attributes |
should attributes be preserved |
Value
Returns x coerced to R base class
[Package ilabelled version 0.9.0 Index]