title: Cumulative sum that resets when 0 is encountered
body: <p>I would like to do a cumulative sum on a field but reset the aggregated value whenever a 0 is encountered.</p>
  
  <p>Here is an example of what I want :</p>
  
  <pre><code>data.frame(campaign = letters[1:4] , 
         date=c("jan","feb","march","april"),
         b = c(1,0,1,1) ,
         whatiwant = c(1,0,1,2)
         )
  
   campaign  date b whatiwant
  1        a   jan 1         1
  2        b   feb 0         0
  3        c march 1         1
  4        d april 1         2
  </code></pre>