title: R check if date is 2 years apart
body: <p>I have a dataset with two columns Id and Date as shown below using a toy dataset.</p>
  
  <pre><code>   Id         Date
     5373283    2010-11-05
     5373283    2014-11-05
     5373283    2001-07-13
     5373283    2007-12-01
     5373283    2015-07-07 
     3475684    2015-05-19
     3475684    2010-06-24  
  </code></pre>
  
  <p>I want to check if any of the dates for <code>each id</code> are within 2 years range. If they are then a column will show yes, if not, No. The final output would look like this</p>
  
  <pre><code>   Id         Status
     5373283    Yes
     3475684    No
  </code></pre>
  
  <p><code>Yes</code> for <code>Id 5373283</code> because the two dates <code>2014-11-05</code> and <code>2015-07-07</code> are within two years of each other. <code>No</code> for <code>Id 3475684</code> because the two dates are more than 2 years apart. Any help on accomplishing this much appreciated.</p>