title: Error "incorrect number of dimensions" - forecasting a tslm
body: <p>Within the &quot;forecast&quot; library, I am trying to run the following code:</p>
  <pre><code>regModel &lt;- tslm(train.ts ~ trend + season)
  testing.ts.predict &lt;- forecast(regModel, h = nTest)
  </code></pre>
  <p>I get the following error:
  Error in <code>[.default</code>(X, , piv, drop = FALSE) : incorrect number of dimensions</p>
  <p>This is especially unusual because at times when I run the code it works, then when I close the program and start it up again, it stops running.</p>
  <p>I can provide more of the code above the portion highlighted in my question, but it runs smoothly (it also runs for other students in my class).</p>
  <p>Wondering if anyone can help with this?</p>
  <p>Thanks so much!</p>