title: Filtering in tidyverse based on a vector/list of possible values
body: <p>I would like to select rows of a data frame based on conditions on two columns that should identify a unique row. In the concrete example below I would like to select 
  <code>id=1,2,3...</code> with a specific mtry value specified in a vector, i.e. For id=1, I just want the first line with <code>mtry=3</code>, for <code>id=2</code> I would like <code>mtry=5</code>.</p>
  
  <p>I tried using <code>group_by</code> and using <code>filter</code> e.g. </p>
  
  <pre><code>filter(df, (mtry,id) %in% c([3,1],[5,2],[3,3]))
  </code></pre>
  
  <p>but this gives an error </p>
  
  <blockquote>
    <p>Error: unexpected ',' in .</p>
  </blockquote>
  
  <p>What is the tidyverse way of doing this?</p>
  
  <p><a href="https://i.stack.imgur.com/rfC1Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rfC1Q.png" alt="enter image description here"></a></p>