title: Confused by R coding example in Hyndman's FPP, Ch 6.2
body: <p>Chapt. 6.2 of Hyndman's book, &quot;Forecasting: Principles and Practice&quot; contains the following text and example R code:</p>
  <blockquote>
  <p>For example, we might take a moving average of order 4, and then apply
  another moving average of order 2 to the results. In the following
  table, this has been done for the first few years of the Australian
  quarterly beer production data.</p>
  <pre><code>beer2 &lt;- window(ausbeer,start=1992)
  ma4 &lt;- ma(beer2, order=4, centre=FALSE)
  ma2x4 &lt;- ma(beer2, order=4, centre=TRUE)
  </code></pre>
  </blockquote>
  <p>I'm confused over this sample code. Does the sample R code match what the text says? The sample code calls the ma() function twice, passing in the same data each time. How does this create a moving average of a moving average. Doesn't this just create 2 simple moving averages on the same data?</p>
  <p>In order to do what the text claims, shouldn't the sample code look like this:</p>
  <pre><code>beer2 &lt;- window(ausbeer,start=1992)
  ma4 &lt;- ma(beer2, order=4, centre=FALSE)
  ma2x4 &lt;- ma(ma4, order=4, centre=TRUE)
  </code></pre>
  <p>Thank you for your kind assistance in this matter.</p>
  <ul>
  <li>DF</li>
  </ul>