View source: R/removeEmptyValLabels.R
removeEmptyValLabels | R Documentation |
Remove unused value labels and missing tags of a variable as part of a GADSdat
object.
removeEmptyValLabels(GADSdat, vars, whichValLabels = c("miss", "valid", "all"))
GADSdat |
|
vars |
Character string of variable names. |
whichValLabels |
Should unused missing value tags and labels ( |
Returns the GADSdat
object with changed meta data.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.