title: How to sum multiple rows in R
body: <p>I have a dataset of 2.5M entries.  Trying to do something fairly basic on that data just adding all rows of the same time.  I have tried SUM and dcast but I'm not sure it is doing what I want.</p>
  
  <pre><code>date,time,available,free,total
  d1,t1,1,2,3
  d1,t1,2,3,4
  d1,t1,3,4,5
  d1,d2,2,3,4
  d1,d3,4,3,2
  d2,t1,2,3,4
  ...
  </code></pre>
  
  <p>I want to sum all the available, free and total figures for each d&amp;t distinct date and time</p>
  
  <p>Tried things like <code>info &lt;- dcast(availwet, scrappedDate + scrappedTime ~ ., sum)</code>
  but that only works if I change the data to have one of available, free or total in the df.</p>