title: Creating loops with xts
body: <p>This may sound trivial, but I want to know how to create a loop with a xts objects. For example I have :</p>
  
  <pre><code>make&lt;-rbind(mean(x['199901']),
          mean(x['199902']),
          mean(x['199903']),
          mean(x['199904']),
          mean(x['199905']),
          mean(x['199906']))
  </code></pre>
  
  <p><code>x</code> is an xts object and I will like to extract monthly means from this.</p>