title: Using cummean with group_by and ignoring NAs
body: <pre><code>df &lt;- data.frame(category=c("cat1","cat1","cat2","cat1","cat2","cat2","cat1","cat2"),
                   value=c(NA,2,3,4,5,NA,7,8))
  </code></pre>
  
  <p>I'd like to add a new column to the above dataframe which takes the cumulative mean of the <code>value</code> column, not taking into account NAs. Is it possible to do this with <code>dplyr</code>? I've tried</p>
  
  <pre><code>df &lt;- df %&gt;% group_by(category) %&gt;% mutate(new_col=cummean(value))
  </code></pre>
  
  <p>but <code>cummean</code> just doesn't know what to do with NAs.</p>
  
  <p>EDIT: I do not want to count NAs as 0.</p>