Learn R Programming

surveydata (version 0.2.7)

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

Description

Returns TRUE if x contains any instances of dk

Usage

has_dont_know(x, dk = "Don't Know")

Value

TRUE or FALSE

Arguments

x

Character vector or factor

dk

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

See Also

Other Functions to clean data: encToInt(), fix_common_encoding_problems(), fix_levels_01_spss(), intToEnc(), leveltest, remove_all_dont_know(), remove_dont_know()