I have a dataframe such as this one:
d <- data.frame(cbind(x=1, y=1:10, z=c(\"apple\",\"pear\",\"banana\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\"
For completeness, since R 3.3.0, grep and friends come with an invert argument:
grep
invert
new_d <- d[grep("K", d$z, invert = TRUE)]