variable lengths differ (found for 'x')
<p>I've seen several cases of this error, but none of them seem to solve or apply to my situation. </p>

<p>I am building a logistic regression model with <code>biglm</code>.</p>

<p>I have a data.frame with ~250 variables and a little over a million rows. </p>

<p>Since <code>bigglm()</code> doesn't work with the dot notation to select all variables in the model I am building my formula like <a href="https://stackoverflow.com/questions/17794575/error-in-terms-formulaformula-in-formula-and-no-data-argument">this</a>.</p>

<p>So if <code>f</code> is my formula and <code>df</code> is my dataframe, then my model looks like this:</p>

<pre><code>fit &lt;- bigglm(f, data = df, family=binomial(link="logit"), chunksize=100, maxit=10)
</code></pre>

<p>And I get the error: <code>variable lengths differ (found for 'x')</code></p>

<p>When I check for length of <code>x</code> it is exactly the same as length of <code>df</code>.</p>

<p>Other StackOverflow questions seem to suggest it might be a problem with the way the formula is constructed. Or perhaps it is a problem with <code>biglm?</code></p>