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

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