View source: R/dict_validate.R
dict_validate | R Documentation |
Check for potential mistakes in the dictionary: 1) Whether the variable names are unique; 2) For each variable, whether there is a unique mapping between level and label and whether the levels are consecutive; and extract unique level-label pairings.
dict_validate(dict)
dict |
A variable dictionary returned by
|
If no mistake found in the dictionary, a dataframe containing the unique level-label pairings. If mistakes found in the dictionary, a list containing the above dataframe and a list with components
non_unique_names - A dataframe containing qids with non-unique names and their names
mistake - A dataframe containing qids with one of the following mistakes and mistake code: not one-to-one mapping between labels and levels (1), levels not increasing in step of 1 (2), duplicated levels (3) and duplicated labels (4).
## Not run:
# Create a dictionary
mydict <- dict_generate("SV_4YyAHbAxpdbzacl",
name = "easy_name",
block_pattern = block_pattern,
block_sep = ".",
split_by_block = FALSE
)
# Validate the dictionary
validation <- dict_validate(mydict)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.