title: Efficient way to aggregate values of a column were value is specific value
body: <p>A quick example</p>
  
  <pre><code>a &lt;- c(1,1,2)
  b &lt;- c(1000,200,20)
  c &lt;- c(10,20,10)
  myframe &lt;- data.frame(a,b,c)
  
  &gt; myframe
    a    b  c
  1 1 1000 10
  2 1  200 20
  3 2   20 10
  </code></pre>
  
  <p>I now want to aggregate the values of column c where the value of column a equals <code>1</code>. The result should consequently be <code>30</code>.</p>
  
  <p>Just a word to the original data the dataframe has about 100,000 rows and 400 columns. The values rows to aggregate pop up about 10-30 times in the data.</p>