title: Adding an "Overall" row that ignores by=x when creating data.frame with data.table
body: <p>I am creating data.frames that summarize columns by different time periods (day of week, time of day, etc) using data.table.</p>
  
  <p>Using by=x, it is obviously quite easy to have, say, the average sales for each day output.  But, I would <em>also</em> like the first row to contain the overall sales averages for each product.</p>
  
  <p>So, for example:</p>
  
  <pre><code>   DayofWeek    Sales
      Sunday  -0.32632766
      Sunday  -1.39525094
      Sunday  -0.17669726
      Sunday  0.85023421
      Sunday  0.86486582
      Monday  -0.09989301
      Monday  0.76727639
      Monday  -1.67428010
      Tuesday 0.07731930
      Tuesday -0.49833578
      Tuesday -1.30299674
      Tuesday 0.15315193
  </code></pre>
  
  <p>(Here's the dput():</p>
  
  <pre><code>structure(list(DayofWeek = structure(c(4L, 4L, 4L, 4L, 4L, 2L, 
  2L, 2L, 6L, 6L, 6L, 6L, 7L, 7L, 5L, 5L, 5L, 1L, 1L, 3L, 3L, 3L, 
  3L), .Label = c("Friday", "Monday", "Saturday", "Sunday", "Thursday", 
  "Tuesday", "Wednesday"), class = "factor"), Sales = c(-0.326327663381262, 
  -1.39525093919452, -0.176697258416924, 0.850234206155951, 0.864865815846249, 
  -0.0998930060078245, 0.767276394000856, -1.67428009516407, 0.0773192989619049, 
  -0.49833577988136, -1.30299673837641, 0.153151927466779, -0.166978329772809, 
  -0.365253835027482, -0.59213504129638, -0.637757052094623, 0.296006778141631, 
  -0.561833927961962, 0.279092660752442, 1.0474353590513, 1.72519764838123, 
  0.343084207813727, 2.00191818865667)), .Names = c("DayofWeek", 
  "Sales"), row.names = c(NA, -23L), class = "data.frame")
  </code></pre>
  
  <p>I can do this</p>
  
  <pre><code>mysample.dt&lt;-as.data.table(sample)
  
  mysales.day&lt;-mysample.dt[,list(MeanSales=mean(Sales)),by=DayofWeek]
  </code></pre>
  
  <p>to get this</p>
  
  <pre><code>    DayofWeek   MeanSales
      Sunday      -0.03663517
      Monday      -0.33563224
      Tuesday     -0.39271532
      Wednesday   -0.26611608
      Thursday    -0.31129511
      Friday      -0.14137063
      Saturday    1.27940885
  </code></pre>
  
  <p>and then I can just run the above without the by=x to produce one for the overall mean, then just combine those two data.frames together.</p>
  
  <p>However, is there a way to do this within my original argument?  </p>
  
  <p>So that the output is:</p>
  
  <pre><code>DayofWeek   MeanSales
  Overall     0.02642795
  Sunday      -0.03663517
  Monday      -0.33563224
  Tuesday     -0.39271532
  Wednesday   -0.26611608
  Thursday    -0.31129511
  Friday      -0.14137063
  Saturday    1.27940885
  </code></pre>
  
  <p>without having to create it in two steps?</p>