title: Sum multiple columns by group
body: <p>I have data which looks like this:</p>
  
  <pre><code>Time ColA ColB ColC
  0    1    10   5
  1    3    7    15
  2    0    8    9
  3    3    4    5
  4    4    5    6
  7    10   23   4
  </code></pre>
  
  <p>I'd like to group my data into time intervals of equal size and sum the variables of each column. This, for instance, would be the result of grouping the time by 2:</p>
  
  <pre><code>Time ColA ColB ColC
  0    4    17   20
  2    3    12   14
  4    4    5    6
  7    10   23   4
  </code></pre>
  
  <p>I could label the data by introducing a new column whose value is <code>floor(data$Time/2)</code>, but it's unclear how to do the summations. Most of the packages I've looked at <em>seem</em> to summarise only a single column, whereas I would like to summarise all the columns.</p>