I have a data.frame named all that has a column of factors, these factors include \"word\",\"nonword\" and some others. My goal is to
all
\"word\"
\"nonword\"
In R, you need two times \:
\
grep("\\bword\\b", all[5])
Alternative solutions:
grep("^word$", all[5]) which(all[5] == "word")