[Rcpp-commits] r1235 - pkg/RcppGSL/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 13 21:58:26 CEST 2010


Author: edd
Date: 2010-05-13 21:58:26 +0200 (Thu, 13 May 2010)
New Revision: 1235

Modified:
   pkg/RcppGSL/R/fastLm.R
Log:
one small fix and minor cosmetics


Modified: pkg/RcppGSL/R/fastLm.R
===================================================================
--- pkg/RcppGSL/R/fastLm.R	2010-05-13 19:40:33 UTC (rev 1234)
+++ pkg/RcppGSL/R/fastLm.R	2010-05-13 19:58:26 UTC (rev 1235)
@@ -29,10 +29,10 @@
 
 fastLm.default <- function(x, y, ...) {
 
+    x <- as.matrix(x)
     y <- as.numeric(y)
-    X <- as.matrix(x)
 
-    res <- fastLmCall(y, X)
+    res <- fastLmCall(y, x)
 
     res$fitted.values <- as.vector(x %*% res$coefficients)
     res$residuals <- y - res$fitted.values
@@ -43,7 +43,7 @@
 }
 
 print.fastLm <- function(x, ...) {
-    cat("Call:\n")
+    cat("\nCall:\n")
     print(x$call)
     cat("\nCoefficients:\n")
     print(x$coefficients)
@@ -66,7 +66,7 @@
 }
 
 print.summary.fastLm <- function(x, ...) {
-    cat("Call:\n")
+    cat("\nCall:\n")
     print(x$call)
     cat("\n")
 



More information about the Rcpp-commits mailing list