Skip to content

Commit 110f2c1

Browse files
committed
tighten code a bit
1 parent f1dc0bb commit 110f2c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastLm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ extern "C" SEXP fastLm(SEXP Xs, SEXP ys, SEXP type) {
168168
const MVectorXd yy(y.begin(), n);
169169
const MMatrixXd XX(X.begin(), n, p);
170170

171-
lm ans = do_lm(MMatrixXd(X.begin(), n, p), yy, ::Rf_asInteger(type));
171+
lm ans = do_lm(XX, yy, ::Rf_asInteger(type));
172172
NumericVector coef(ans.coef().data(), ans.coef().data() + p);
173173
// install the names, if available
174174
List dimnames = X.attr("dimnames");

0 commit comments

Comments
 (0)