powered by
If there are known typos, the correct values of those incorrect responses can be provided and fixed across the dataset.
fixTypos(data, old, new = NULL, var = "RANK_CD")
VADIR dataset
Character vector containing typos
Character vector in the same order as old, containing corresponding values to fix typos to.
old
Variable name for which typos should be corrected
VADIR dataset with typos corrected
# NOT RUN { data <- fixTypos(data = VADIR_fake, old = c('CW02', 'CW0-2', 'PV1'), new = c('CWO2', 'CWO2', 'PVT'), var = 'RANK_CD') # }
Run the code above in your browser using DataLab