title: Find rows where one column string is in another column using dplyr in R
body: <p>Looking to pull back rows where the value in one column exists as a string in another column (within the same row).</p>
  
  <p>I have a df:</p>
  
  <pre><code>A &lt;- c("cat", "dog", "boy")
  B &lt;- c("cat in the cradle", "meet the parents", "boy mmets world")
  
  df &lt;- as.data.frame(A, B)
  
  A       B
  cat     cat in the cradle
  dog     meet the parents
  boy     boy meets world
  </code></pre>
  
  <p>I'm trying things like:</p>
  
  <pre><code>df2 &lt;- df %&gt;%
            filter(grepl(A, B)) # doesn't work because it thinks A is the whole column vector
  
  df2 &lt;- df %&gt;%
            filter(B %in% A) # which doesn't work because it has to be exact
  </code></pre>
  
  <p>I want it to produce</p>
  
  <pre><code>A       B
  cat     cat in the cradle
  boy     boy meets world
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>Matt</p>