[Rcpp-commits] r1246 - in pkg: RcppArmadillo/inst/unitTests RcppGSL/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat May 15 01:30:44 CEST 2010
Author: edd
Date: 2010-05-15 01:30:44 +0200 (Sat, 15 May 2010)
New Revision: 1246
Modified:
pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R
pkg/RcppGSL/inst/unitTests/runit.fastLm.R
Log:
more small fixes
Modified: pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R
===================================================================
--- pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R 2010-05-14 14:56:49 UTC (rev 1245)
+++ pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R 2010-05-14 23:30:44 UTC (rev 1246)
@@ -80,9 +80,9 @@
PACKAGE="RcppArmadillo")
fit <- lm(log(Volume) ~ log(Girth), data=trees)
- checkEquals( as.numeric(flm$coefficients), as.numeric(coef(fit)),
+ checkEquals(as.numeric(flm$coefficients), as.numeric(coef(fit)),
msg="fastLm.coef")
- checkEquals( as.numeric(flm$stderr), as.numeric(coef(summary(fit))[,2]),
+ checkEquals(as.numeric(flm$stderr), as.numeric(coef(summary(fit))[,2]),
msg="fastLm.stderr")
}
@@ -91,7 +91,7 @@
flm <- fastLm(log(Volume) ~ log(Girth), data=trees)
fit <- lm(log(Volume) ~ log(Girth), data=trees)
- checkEquals(flm$coef, coef(fit), msg="fastLm.formula.coef")
+ checkEquals(flm$coefficients, coef(fit), msg="fastLm.formula.coef")
checkEquals(as.numeric(flm$stderr), as.numeric(coef(summary(fit))[,2]),
msg="fastLm.formula.stderr")
}
Modified: pkg/RcppGSL/inst/unitTests/runit.fastLm.R
===================================================================
--- pkg/RcppGSL/inst/unitTests/runit.fastLm.R 2010-05-14 14:56:49 UTC (rev 1245)
+++ pkg/RcppGSL/inst/unitTests/runit.fastLm.R 2010-05-14 23:30:44 UTC (rev 1246)
@@ -22,7 +22,7 @@
data(trees)
flm <- .Call("fastLm",
log(trees$Volume),
- cbind(rep(1,31), log(trees$Girth)),
+ cbind(1, log(trees$Girth)),
PACKAGE="RcppGSL")
fit <- lm(log(Volume) ~ log(Girth), data=trees)
@@ -32,3 +32,16 @@
msg="fastLm.stderr")
}
+test.fastLm.formula <- function() {
+ data(trees)
+ flm <- fastLm(log(Volume) ~ log(Girth), data=trees)
+ fit <- lm(log(Volume) ~ log(Girth), data=trees)
+
+ checkEquals(flm$coefficients, coef(fit), msg="fastLm.formula.coef")
+ checkEquals(as.numeric(flm$stderr), as.numeric(coef(summary(fit))[,2]),
+ msg="fastLm.formula.stderr")
+}
+
+
+
+
More information about the Rcpp-commits
mailing list