title: Find min and max value for each year with date
body: <p>I have a huge data set and I want the minimum and maximum value for each year with the date.</p>
  
  <p>My dataframe <code>df</code> looks like this:</p>
  
  <pre><code>Date       a  b  
  01/20/2015 20 50 
  05/13/2015 60 70
  10/18/2015 22 45
  04/22/2016 15 40
  04/25/2016 20 30
  06/28/2016 33 45
  01/01/2018 90 20
  04/25/2018 50 30
  10/19/2018 45 55
  </code></pre>
  
  <p>And I want my output like this</p>
  
  <pre><code>Date       min.a max.a min.b max.b
  01/20/2015 20      
  05/13/2015        70
  10/18/2015               45   
  05/13/2015                    70
  </code></pre>
  
  <p>and similarly for other years.</p>
  
  <p>I was using the following code but I was not able to extract the date of each year.
  I have extracted the year from the date column.</p>
  
  <pre><code>df$year&lt;-format(df$date,"%y")
  df%&gt;%
  group_by(a,b)%&gt;%summarize(min(a),max(a),min(b),max(b))
  </code></pre>
  
  <p>but I do not get my desired output. I want min-max value for each year with the date .</p>