Description Usage Arguments Value Examples
Functions to extract information about the declared missing values, or to declare such values if they are present in the data.
1 2 3 4 5 6 7 | value_labels(x, prefixed = FALSE)
value_labels(x) <- value
variable_label(x)
variable_label(x) <- value
|
x |
A vector. |
prefixed |
Logical, prefix labels with values. |
value |
Any vector of values that should be declared as missing
(for |
value_labels()
will return a named vector.
variable_label()
will return a single character string.
1 2 3 4 5 6 7 8 9 10 11 12 13 | x <- mixed_labelled(c(-2, 1:5, -1),
labels = c(Good = 1, Bad = 5, DK = -1),
na_values = c(-1, -2),
label = "Test variable")
x
value_labels(x)
value_labels(x) <- c(Good = 1, Bad = 5, DK = -1, NotApplicable = -2)
variable_label(x)
variable_label(x) <- "This is a proper label"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.