title: Filtering a data frame on a vector
body: <p>I have a data frame <code>df</code> with an ID column eg <code>A</code>,<code>B</code>,etc. I also have a vector containing certain IDs:</p>
  
  <pre><code>L &lt;- c("A", "B", "E")
  </code></pre>
  
  <p>How can I filter the data frame to get only the IDs present in the vector? Individually, I would use</p>
  
  <pre><code>subset(df, ID == "A")
  </code></pre>
  
  <p>but how do I filter on a whole vector?</p>