Douglas Bates <bates at cs.wisc.edu> writes: ... > Try changing the call of lm.fit to > lm.fit(x[ind, , drop = FALSE), y[ind]) It will probably work better without the syntax error, as lm.fit(x[ind, , drop = FALSE], y[ind])