Remove unused value labels and missing tags.
Source:R/removeEmptyValLabels.R
removeEmptyValLabels.Rd
Remove unused value labels and missing tags of a variable as part of a GADSdat
object.
Usage
removeEmptyValLabels(GADSdat, vars, whichValLabels = c("miss", "valid", "all"))
Examples
gads <- import_DF(data.frame(v1 = 1))
gads <- changeMissings(gads, varName = "v1", value = c(-99, -98), missings = c("miss", "miss"))
gads <- changeValLabels(gads, varName = "v1", value = c(-99), valLabel = c("not reached"))
gads2 <- removeEmptyValLabels(gads, vars = "v1")