d to group by many variables, use:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># the dplyr syntax:</span></span>
<span><span class="co"># daily &lt;- group_by(flights, year, month, day)</span></span>
<span><span class="co"># (per_day   &lt;- summarise(daily, flights = n()))</span></span>
<span></span>
<span><span class="va">flights</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="externa