title: Find max per group with dplyr in R
body: <p>I'm trying to get the carrier with the max value of flights during the summer months</p>
  
  <pre><code>max_flights_all_c&lt;-nycflights13::flights %&gt;%
     group_by(carrier,month)%&gt;%
     filter(month==6 | month==7 | month==8 | month==9)%&gt;%
      summarise(n=n()) 
  </code></pre>
  
  <p>Now I'm getting;</p>
  
  <pre><code>carrier month   n
  9E  7   1494
  9E  8   1456
  9E  9   1540
  AA  6   2757
  AA  7   2882
  AA  8   2856
  AA  9   2614
  AS  6   60
  AS  7   62
  AS  8   62
  AS  9   60
  B6  6   4622
  B6  7   4984
  </code></pre>
  
  <p>but want to obtain only the max value of n for month each month.</p>