fixTypos: Fix typos in VADIR dataset

Description Usage Arguments Value Examples

View source: R/fixTypos.R

Description

If there are known typos, the correct values of those incorrect responses can be provided and fixed across the dataset.

Usage

1
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 old, containing corresponding values to fix typos to.

var

Variable name for which typos should be corrected

Value

VADIR dataset with typos corrected

Examples

1
2
data <- fixTypos(data = VADIR_fake, old = c('CW02', 'CW0-2', 'PV1'),
                 new = c('CWO2', 'CWO2', 'PVT'), var = 'RANK_CD')

sampleVADIR documentation built on Oct. 27, 2021, 5:08 p.m.