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

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

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, fixLevels01, fixLevels01R, fixLevels01SPSS, hasDK, intToEnc, leveltestR, leveltestSPSS, removeAllDK

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.