Learn R Programming

surveydata (version 0.2.0)

hasDK: Tests whether levels contain "Don't know".

Description

Returns TRUE if x contains any instances of dk

Usage

hasDK(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

TRUE or FALSE

See Also

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