title: Keeps rows using values from other dataframe
body: <p>This is the first dataframe:</p>
  
  <pre><code>  df1 &lt;- data.frame(pid = c(12,13,14,15,16,17,32,44,3,4,59,2,91), name = c(product1,product2,product3,product,product4,product5,product6,product7,product8,product9,product10,product11,product12,product43))
  </code></pre>
  
  <p>I would like to extract a new subset of df1 using as index values the pid of df2:</p>
  
  <pre><code>df2 &lt;- data.frame(pid = c(12,13,14,4,2))
  </code></pre>
  
  <p>Example of subset:</p>
  
  <pre><code>  df1 &lt;- data.frame(pid = c(12,13,14,15,16,17,32,44,2,4,59,2,91), name = c(product1,product2,product3,product10,product12))
  </code></pre>
  
  <p>how could I make it?</p>