[Rcpp-commits] r1238 - pkg/RcppGSL/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 14 03:54:51 CEST 2010
Author: edd
Date: 2010-05-14 03:54:51 +0200 (Fri, 14 May 2010)
New Revision: 1238
Modified:
pkg/RcppGSL/R/fastLm.R
Log:
set names in default method not formula method
Modified: pkg/RcppGSL/R/fastLm.R
===================================================================
--- pkg/RcppGSL/R/fastLm.R 2010-05-14 01:54:11 UTC (rev 1237)
+++ pkg/RcppGSL/R/fastLm.R 2010-05-14 01:54:51 UTC (rev 1238)
@@ -33,6 +33,8 @@
y <- as.numeric(y)
res <- fastLmCall(y, x)
+ names(res$coefficients) <- colnames(x)
+ colnames(res$vcov) <- rownames(res$vcov) <- colnames(x)
res$fitted.values <- as.vector(x %*% res$coefficients)
res$residuals <- y - res$fitted.values
@@ -79,8 +81,6 @@
y <- model.response(mf)
res <- fastLm.default(x, y, ...)
- names(res$coefficients) <- colnames(x)
- colnames(res$vcov) <- rownames(res$vcov) <- colnames(x)
res$call <- match.call()
res$formula <- formula
res
More information about the Rcpp-commits
mailing list