View source: R/dictionary_based_cleaning.R
add_to_dictionary | R Documentation |
Add an element to the data dictionary
add_to_dictionary(dictionary, option, value, grp, order = NULL)
dictionary |
A data frame with the data dictionary |
option |
A vector of strings with the new options that need to be added to the dictionary. |
value |
A vector with the values to be used when replacing the new options. |
grp |
A vector with the name of the column that contains the option of interest. |
order |
A numeric with the order of the new option. |
An object of type data frame. This is the new data dictionary with an additional line that contains the details about the new options.
test <- add_to_dictionary(
dictionary = readRDS(system.file("extdata", "test_dict.RDS",
package = "cleanepi")),
option = "ml",
value = "male",
grp = "gender",
order = NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.