data <- readRDS(
system.file("extdata", "messy_data.RDS", package = "cleanepi")
)
dictionary <- readRDS(
system.file("extdata", "test_dict.RDS", package = "cleanepi")
)
# adding an option that is not defined in the dictionary to the 'gender'
# column
data$gender[2] <- "homme"
cleaned_df <- clean_using_dictionary(
data = data,
dictionary = dictionary
)
Run the code above in your browser using DataLab