title: Error in round(frequency): non-numeric argument to math function from VAR model
body: <p>Help solve:</p>
  
  <blockquote>
    <p>fcst.tmp &lt;- forecast(VAR.tmp)
    <strong>Error in round(frequency) : non-numeric argument to mathematical function</strong></p>
  </blockquote>
  
  <p>From code:</p>
  
  <pre><code>library(vars)  
  tmp.matrix &lt;- matrix(data = c(0,                     -0.0018674142,                     0.0046620131,
                       0.0037140247,                     -0.0009272138,                     0.0064725145,
                       -0.000922084,                     -0.0046232167,                     0.0210920245,
                       -0.0100320039,                     0.0136551962,                     -0.00725956,
                       0.0251811866,                     -0.0089206658,                     -0.000896459,
                       0.0035810244,                     0.0159577854,                     -0.0097216851,
                       0.0176060886,                     0.0034843241,                     -0.0017406445,
                       0.0198367867,                     -0.0034217313,                     -0.0225312824,
                       -0.0043917506,                     0.0157208478,                     -0.0148409533,
                       0.0234691345,                     -0.0401374128,                     -0.0132217389,
                       0.0269124178,                     -0.006590583,                     0.0255472708,
                       0.003401652,                     0.0052493174,                     -0.0011235182,
                       -0.0033622663,                     -0.0193530068,                     -0.0302611445,
                       -0.0076587663,                     -0.0023782155,                     -0.026358019,
                       0.0161200327,                     0.0171822796,                     0.0193783756,
                       0.0091528136,                     -0.0101419116,                     -0.0013561094,
                       0.000172569,                     -0.0071663343,                     -0.0119922952,
                       0.0044839696,                     0.0029657989,                     -0.0114150402,
                       -0.0018366463,                     0.0116721141),ncol = 2)
  
  colnames(tmp.matrix) &lt;- c("Col1","Col2")
  
  VAR.tmp &lt;- VAR(tmp.matrix, p=1, type = "const")
  
  fcst.tmp &lt;- forecast(VAR.tmp)
  </code></pre>
  
  <p>P.S.</p>
  
  <p>The <code>tmp.matrix</code> needs to be converted to a time series though:</p>
  
  <pre><code>ts.matrix &lt;- as.ts(tmp.matrix)
  VAR.tmp &lt;- VAR(ts.matrix, p=1, type = "const")
  fcst.tmp &lt;- forecast(VAR.tmp)
  plot(fcst.tmp)
  </code></pre>