Change or add missing codes 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
# Set a specific value to missing
pisa2 <- changeMissings(pisa, varName = "computer_age",
value = 5, missings = "miss")
# Set multiple values to missing
pisa3 <- changeMissings(pisa, varName = "computer_age",
value = 1:4,
missings = c("miss", "miss", "miss", "miss"))
# Set a specific value to not missing
pisa4 <- changeMissings(pisa2, varName = "computer_age",
value = 5, missings = "valid")