title: detecting word boundary with regex in data frame in R
body: <p>I have a data.frame named <code>all</code> that has a column of factors, these factors include <code>"word"</code>,<code>"nonword"</code> and some others. My goal is to select only the rows that have the factor value "word". </p>
  
  <p>My solution <code>grep("\bword\b",all[,5])</code> returns nothing. </p>
  
  <p>How come word boundaries are not recognized?</p>