title: Calculate cumulative average (mean)
body: <p>I would like to know how to calculate the cumulative average for some numbers. I will give a simple example to describe what I am looking for. </p>
  
  <p>I have the following numbers </p>
  
  <pre><code>vec &lt;- c(1, 2, 3, 4, 5)
  </code></pre>
  
  <p>If I do the average of these numbers I will get 3 as a result. </p>
  
  <p>Now, how to do the cumulative average of these numbers.  </p>