[Rcpp-commits] r3223 - pkg/RcppEigen/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 26 17:18:53 CEST 2011


Author: dmbates
Date: 2011-10-26 17:18:53 +0200 (Wed, 26 Oct 2011)
New Revision: 3223

Modified:
   pkg/RcppEigen/inst/unitTests/runit.fastLm.R
Log:
Test all methods


Modified: pkg/RcppEigen/inst/unitTests/runit.fastLm.R
===================================================================
--- pkg/RcppEigen/inst/unitTests/runit.fastLm.R	2011-10-26 15:18:28 UTC (rev 3222)
+++ pkg/RcppEigen/inst/unitTests/runit.fastLm.R	2011-10-26 15:18:53 UTC (rev 3223)
@@ -40,6 +40,14 @@
                   cbind(1, log(trees$Girth)),
                   log(trees$Volume), 3L,
                   PACKAGE="RcppEigen")
+    flm4 <- .Call("fastLm",
+                  cbind(1, log(trees$Girth)),
+                  log(trees$Volume), 4L,
+                  PACKAGE="RcppEigen")
+    flm5 <- .Call("fastLm",
+                  cbind(1, log(trees$Girth)),
+                  log(trees$Volume), 5L,
+                  PACKAGE="RcppEigen")
     fit <- lm(log(Volume) ~ log(Girth), data=trees)
     fitCoef <- unname(coef(fit))
     fitStdErr <- unname(coef(summary(fit))[, "Std. Error", drop = TRUE])
@@ -51,6 +59,10 @@
     checkEquals(flm2$se, fitStdErr, msg="fastLm2.stderr")
     checkEquals(flm3$coefficients, fitCoef, msg="fastLm3.coef")
     checkEquals(flm3$se, fitStdErr, msg="fastLm3.stderr")
+    checkEquals(flm4$coefficients, fitCoef, msg="fastLm0.coef")
+    checkEquals(flm4$se, fitStdErr, msg="fastLm0.stderr")
+    checkEquals(flm5$coefficients, fitCoef, msg="fastLm0.coef")
+    checkEquals(flm5$se, fitStdErr, msg="fastLm0.stderr")
 }
 
 



More information about the Rcpp-commits mailing list