Perform dictionary-based cleaning
Examples
data <- readRDS(
system.file("extdata", "messy_data.RDS", package = "cleanepi")
)
dictionary <- readRDS(
system.file("extdata", "test_dict.RDS", package = "cleanepi")
)
data$gender[2] <- "homme"
cleaned_df <- clean_using_dictionary(
data = data,
dictionary = dictionary
)
#>
#> Detected misspelled values at lines 2 of column 'gender'
#> Please add the misspelled options to the data dictionary using the add_to_dictionary() function.