title: 'Invalid term in model formula' when calling R.armaFit
body: <p>I'm getting this message:</p>
  
  <blockquote>
    <p>Error in terms.formula(formula, data = data) : </p>
    
    <p>invalid term in model formula</p>
  </blockquote>
  
  <p>When calling this code:</p>
  
  <pre><code>let data : float[] = // ...
  R.eval(R.parse(text="library(fArma)")) |&gt; ignore
  
  let dataset =
      namedParams["XX", box data]
      |&gt; R.data_frame
  
  let fitted = R.armaFit(formula="XX ~ arma(1 , 1)", data=dataset)
  </code></pre>
  
  <p>The error is triggered by the last line.</p>
  
  <p>I've tried removing the <code>box</code>, the <code>XX ~</code>, but I get the same result.</p>
  
  <p>I was trying to follow this guide:
  <a href="https://www.r-bloggers.com/arma-models-for-trading/" rel="nofollow noreferrer">https://www.r-bloggers.com/arma-models-for-trading/</a></p>
  
  <p>The log reports this:</p>
  
  <blockquote>
    <p>[03/02/17 18:01:46] [Pid:10004, Tid:1, Apid:1]
    eval(base::<code>data.frame</code>(XX=fsr_10004_3)) [03/02/17 18:01:46]
    [Pid:10004, Tid:1, Apid:1] Output:  [03/02/17 18:01:50] [Pid:10004,
    Tid:1, Apid:1] eval(fArma::<code>armaFit</code>(formula=fsr_10004_4,
    data=fsr_10004_5)) [03/02/17 18:01:50] [Pid:10004, Tid:1, Apid:1]
    Output: Error in terms.formula(formula, data = data) :    invalid term
    in model formula</p>
    
    <p>[03/02/17 18:01:50] [Pid:10004, Tid:1, Apid:1] Operation failed:<br>
    RDotNet.EvaluationException: Error in terms.formula(formula, data =
    data) :    invalid term in model formula</p>
  </blockquote>