removeDK: Removes "Don't know" from levels and replaces with NA.

Description Usage Arguments Value See Also

View source: R/cleandata.R

Description

Tests the levels of x contain any instances of "Don't know". If so, replaces these levels with NA

Usage

1
removeDK(x, dk = "Don't Know")

Arguments

x

Character vector or factor

dk

Character vector, containing search terms, e.g. c("Don't know", "Don't Know")

Value

A factor with "Dont know" removed

See Also

Other Functions to clean data: encToInt, fixCommonEncodingProblems, fixLevels01R, fixLevels01SPSS, fixLevels01, hasDK, intToEnc, leveltestR, leveltestSPSS, removeAllDK


surveydata documentation built on July 20, 2017, 1:04 a.m.

Search within the surveydata package
Search all R packages, documentation and source code