fixTypos {sampleVADIR} | R Documentation |
Fix typos in VADIR dataset
Description
If there are known typos, the correct values of those incorrect responses can be provided and fixed across the dataset.
Usage
fixTypos(data, old, new = NULL, var = "RANK_CD")
Arguments
data |
VADIR dataset |
old |
Character vector containing typos |
new |
Character vector in the same order as |
var |
Variable name for which typos should be corrected |
Value
VADIR dataset with typos corrected
Examples
data <- fixTypos(data = VADIR_fake, old = c('CW02', 'CW0-2', 'PV1'),
new = c('CWO2', 'CWO2', 'PVT'), var = 'RANK_CD')
[Package sampleVADIR version 1.0.0 Index]