
Coercion methods for labelled survey vectors
Source:R/labelled_spss_survey_coercion.R
labelled_spss_survey_coercion.RdConvert labelled SPSS-style survey vectors to common R data types. These helpers provide consistent coercion behavior for `"retroharmonize_labelled_spss_survey"` objects while respecting labelled missing values.
Value
* `as_numeric()` returns a numeric vector with labelled missing values converted to `NA`. * `as_character()` returns a character vector based on the factor representation of `x`. * `as_factor()` returns a factor with levels derived from value labels.
See also
[labelled_spss_survey()], [haven::as_factor()]
Other type conversion functions:
as_labelled_spss_survey()