title: Faster function than aggregate() in R
body: <p>I have the following part of my code:</p>
  
  <pre><code> result &lt;- aggregate(cbind(x1,x2,x3,y1,y2,y3,z1,z2,z3,w)~date, rbind(result, datanew), sum, na.rm=F) 
  </code></pre>
  
  <p>Is there a faster way to obtain the same result?
  What I wouldlike to do is every time when I have a new data, the new data to be rbinded with the old one and in same time to do the sum per column and row.</p>
  
  <p>For instance:</p>
  
  <pre><code>old.data=data.frame(x=c(1:3),y=c(4:6),z=c(7:9),id=c("A","B","B"))
  new.data=data.frame(x=c(2:4),y=c(5:7),z=c(8:10),id=c("B","A","A"))
  result &lt;- aggregate(cbind(x,y,z)~id, rbind(old.data, new.data), sum, na.rm=F)
  </code></pre>
  
  <p>I am searching for a better solution because this is repeated 100000 times. </p>
  
  <p>Thanks</p>