title: data length cannot be over width of moving average
body: <p>I use <code>quantmod</code>, to calculate the moving average over 2000 dataframes with loop</p>
  <p>price = xts object</p>
  <pre><code>price &lt;- cbind(price, SMA(price, 5), SMA(price, 10),
  SMA(price, 20), SMA(price, 60), SMA(price, 120),
  SMA(price, 180), SMA(price, 240))
  </code></pre>
  <p>But some data don't exceed the number of width, stop running in the middle. In that case, I just want to fill <code>NA</code> only.
  I need some support to solve this problem.
  Or if I need to use any other package for solving this problem, let me know</p>
  <p>Thanks</p>