title: Understanding tally(sort = TRUE)
body: <p>So there was this code before:</p>
  
  <pre><code>flights %&gt;%
    group_by(dest) %&gt;%
    summarise(arr_delay = mean(arr_delay, na.rm = TRUE),
    n = n()) %&gt;%
  arrange(desc(arr_delay))
  </code></pre>
  
  <p>This code I understand. However this code right below that one shows:</p>
  
  <pre><code>flights %&gt;%
    group_by(carrier, flight, dest) %&gt;%
    tally(sort = TRUE) %&gt;% # Save some typing
    filter( n == 365)
  </code></pre>
  
  <p>So this code I don't get the </p>
  
  <pre><code>tally(sort = TRUE)
  </code></pre>
  
  <p>When it said save some typing, what exactly is it saving? I understand that the <code>tally(sort = TRUE)</code> replaces <code>summerise(n = n())</code>, but how does it "save typing" and how does it relate to each other? If anyone can give me a break down of <code>tally(sort = TRUE)</code> that'd be greatly appreciated!</p>