title: Running lm() errror: Error in xj[i] : invalid subscript type 'list'
body: <p>I keep getting this error and I don't understand what I am supposed to change</p>
  <p>Here is the code I am using.</p>
  <pre><code>fit &lt;- elsa12 %&gt;%
     lm(formula = notact1~cesd2, data = elsa12)%&gt;%
      filter(!is.na(notact1),!is.na(ncesd2))
  </code></pre>
  <blockquote>
  <p>Error in xj[i] : invalid subscript type 'list'.</p>
  </blockquote>