Renames variables in an edsurvey.data.frame
,
a light.edsurvey.data.frame
, or an edsurvey.data.frame.list
.
This function often is used when users want to conduct a gap analysis across
years but variable names differ across two years of data.
Arguments
- x
an
edsurvey.data.frame
, alight.edsurvey.data.frame
, or anedsurvey.data.frame.list
- oldnames
a character vector of old variable names
- newnames
a character vector of new variable names to replace the corresponding old names
- avoid_duplicated
a logical value to indicate whether to avoid renaming the variable if the corresponding new name already exists in the data. Defaults to
TRUE
.