title: Get indices of common rows from two different dataframes
body: <p>I  have two dataframes:</p>
  
  <pre><code>df1 &lt;- data.frame(cola = c("dum1", "dum2", "dum3"), colb = c("bum1", "bum2", "bum3"), colc = c("cum1", "cum2", "cum3"))
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>df2 &lt;- data.frame(cola = c("dum1", "dum2", "dum4"), colb = c("bum1", "bum2", "bum3"))
  </code></pre>
  
  <p>I need to find the indices of the rows in dataframe <code>df1</code> in which the columns <code>cola</code> and <code>colb</code> are the same, here it would be row 1 and row 2. I know the <code>inner_join</code> function from the <code>dplyr</code> package but this results in a new dataframe. I just need a vector with the indices. I could do this with <code>which</code> for each column needed but this would be ugly if I need to find common rows based on a large number of columns.</p>
  
  <p>Any help is much appreciated.</p>