title: How to add totals as well as group_by statistics in R
body: <p>When computing any statistic using <code>summarise</code> and <code>group_by</code> we only get the summary statistic per-category, and not the value for all the population (Total). How to get both?</p>
  
  <p>I am looking for something clean and short. Until now I can only think of:</p>
  
  <pre><code>bind_rows( 
    iris %&gt;% group_by(Species) %&gt;% summarise(
      "Mean" = mean(Sepal.Width), 
      "Median" = median(Sepal.Width), 
      "sd" = sd(Sepal.Width), 
      "p10" = quantile(Sepal.Width, probs = 0.1))
    , 
    iris %&gt;% summarise(
      "Mean" = mean(Sepal.Width), 
      "Median" = median(Sepal.Width), 
      "sd" = sd(Sepal.Width), 
      "p10" = quantile(Sepal.Width, probs = 0.1)) %&gt;% 
    mutate(Species = "Total")
    )
  </code></pre>
  
  <p>But I would like something more compact. In particular, I don't want to type the code (for summarize) twice, once for each group and once for the total.</p>