View source: R/checkValLabels.R
checkEmptyValLabels | R Documentation |
Check value labels for (a) value labels with no occurrence in the data (checkEmptyValLabels
) and
(b) values with no value labels (checkMissingValLabels
).
checkEmptyValLabels(
GADSdat,
vars = namesGADS(GADSdat),
valueRange = NULL,
output = c("list", "data.frame")
)
checkMissingValLabels(
GADSdat,
vars = namesGADS(GADSdat),
classes = c("integer"),
valueRange = NULL,
output = c("list", "data.frame")
)
GADSdat |
A |
vars |
Character vector with the variable names to which |
valueRange |
[optional] Numeric vector of length 2: In which range should numeric values be checked? If specified, only numeric values are returned and strings are omitted. |
output |
Should the output be structured as a |
classes |
Character vector with the classes to which |
NAs
are excluded from this check. Designated missing codes are reported normally.
Returns a list of length vars
or a data.frame
.
checkEmptyValLabels()
: check for superfluous value labels
checkMissingValLabels()
: check for missing value labels
# Check a categorical and a metric variable
checkMissingValLabels(pisa, vars = c("g8g9", "age"))
checkEmptyValLabels(pisa, vars = c("g8g9", "age"))
# Check while defining a specific value range
checkMissingValLabels(pisa, vars = c("g8g9", "age", "idschool"),
valueRange = c(0, 5))
checkEmptyValLabels(pisa, vars = c("g8g9", "age", "idschool"),
valueRange = c(0, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.