title: Subset of dataframe based on values in another dataframe
body: <p>I have about 20,000 unique identifiers in a column in one dataframe. I want to filter the data from a second, larger dataframe (about 180,000 rows) so that only the rows with matching identifiers are left.</p>
  
  <p>So, dataframe 1 looks something like this</p>
  
  <pre><code>    df1 &lt;- c("identifierab1","identifier56gh","identifier4znvh2")
  </code></pre>
  
  <p>dataframe 2 has 72 columns but one of the columns also has identifiers </p>
  
  <pre><code>    df2$relevantcolumn &lt;- c("identifierab1", "identifierab1", "identifier9472bh")
  </code></pre>
  
  <p>Ultimately, I want to filter df2 so that the only rows left are the rows in which <code>df2$relevantcolumn</code> matches the values in <code>df1</code>. I have tried <code>%in%</code> and <code>matches</code> but nothing seems to work..</p>