Removes "Do not know" and other similar words from factor levels in data frame

remove_all_dont_know(x, dk = NULL, message = TRUE)

Arguments

x

List or data frame

dk

Character vector, containing search terms, e.g. c("Do not know", "DK"). These terms will be replaced by NA. If NULL, defaults to c("I don't know", "Don't Know", "Don't know", "Dont know" , "DK")

message

If TRUE, displays message with the number of instances that were removed.

Value

A data frame