Stores variable labels, value labels, question prefaces, notes, and
transformation history for variables in a survey design object.
Automatically populated from haven-style attributes when
as_survey() or related constructors are called.
Arguments
- variable_labels
A named list mapping variable names to character labels (e.g.,
list(age = "Age in years")).- value_labels
A named list mapping variable names to named vectors of value labels (e.g.,
list(sex = c(Male = 1L, Female = 2L))).- question_prefaces
A named list mapping variable names to shared question battery preface text.
- notes
A named list mapping variable names to analyst notes.
- transformations
A named list tracking variable transformation history (populated automatically during operations).
- weighting_history
A list recording weighting operations applied to the survey object (e.g., raking, trimming). Each entry is written by a surveyweights function and contains the operation name, parameters, effective sample size before/after, and design effect. Always
list()until a surveyweights weighting function is applied. Reserved for Phase 2.5.
See also
Other metadata:
extract_question_preface(),
extract_val_labels(),
extract_var_label(),
extract_var_note(),
infer_question_prefaces(),
set_question_preface(),
set_question_prefaces(),
set_val_labels(),
set_value_labels(),
set_var_label(),
set_var_note(),
set_variable_labels(),
set_variable_notes(),
survey_weighting_history()