Change or add value labels of a variable as part of a GADSdat
or all_GADSdat
object.
Details
Applied to a GADSdat
or all_GADSdat
object, this function is a wrapper of getChangeMeta
and
applyChangeMeta
.
Examples
# Change existing value labels
pisa2 <- changeValLabels(pisa, varName = "repeated",
value = c(1, 2),
valLabel = c("no grade repetition", "grade repitition"))
# Add value label to unlabeled value
mtcars_g <- import_DF(mtcars)
mtcars_g2 <- changeValLabels(mtcars_g, varName = "cyl",
value = c(4, 6, 8),
valLabel = c("four", "six", "eight"))