title: Subset by multiple conditions
body: <p>Maybe it's something basic, but I couldn't find the answer.<br>
  I have  </p>
  
  <pre><code>Id Year V1  
   1 2009 33   
   1 2010 67  
   1 2011 38  
   2 2009 45  
   3 2009 65  
   3 2010 74  
   4 2009 47  
   4 2010 51  
   4 2011 14
  </code></pre>
  
  <p>I need to select only the rows that have the same Id but it´s in the three years 2009, 2010 and 2011.  </p>
  
  <pre><code>Id Year V1  
   1 2009 33  
   1 2010 67  
   1 2011 38  
   4 2009 47  
   4 2010 51  
   4 2011 14   
  </code></pre>
  
  <p>I try</p>
  
  <pre><code>d1_3 &lt;- subset(d1, Year==2009 |Year==2010 |Year==2011 )
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>Can anyone provide some suggestions that how I can do this in R?</p>