data(efc)
get_labels(efc$e42dep)
x <- add_labels(efc$e42dep, c(`5` = "nothing"))
get_labels(x)
x <- add_labels(efc$e42dep, c(`5` = "nothing", `0` = "zero value"))
get_labels(x, include.values = "p")
# replace old values
x <- add_labels(efc$e42dep, c(`4` = "not so dependent", `5` = "lorem ipsum"))
get_labels(x, include.values = "p")
Run the code above in your browser using DataLab