title: Why is dplyr::cummean(x) not equal to cumsum(x)/seq_along(x)?
body: <p>Why is <code>cummean(x)</code> not equal to <code>cumsum(x)/seq_along(x)</code>?</p>
  
  <pre><code>set.seed(456)
  x &lt;- as.integer(runif(30)*300)
  x
  
  cummean(x)
  cumsum(x)/seq_along(x)
  
  [1]  26  63 219 255 236  99  24  85  71 115 111  65 226 246 179 195 252 135 215  87  53 216 271 133 251 211 285 192  22  76
   [1]  26.00000  26.00000  38.33333  83.50000 117.80000 137.50000 132.00000 118.50000 114.77778 110.40000 110.81818 110.83333 107.30769 115.78571 124.46667 127.87500 131.82353
  [18] 138.50000 138.31579 142.15000 139.52381 135.59091 139.08696 144.58333 144.12000 148.23077 150.55556 155.35714 156.62069 152.13333
  
   [1]  26.0000  44.5000 102.6667 140.7500 159.8000 149.6667 131.7143 125.8750 119.7778 119.3000 118.5455 114.0833 122.6923 131.5000 134.6667 138.4375 145.1176 144.5556 148.2632
  [20] 145.2000 140.8095 144.2273 149.7391 149.0417 153.1200 155.3462 160.1481 161.2857 156.4828 153.8000
  </code></pre>