[Rcpp-commits] r1052 - in pkg/RcppArmadillo: . R inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 15 12:55:01 CEST 2010


Author: romain
Date: 2010-04-15 12:55:00 +0200 (Thu, 15 Apr 2010)
New Revision: 1052

Modified:
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/R/armadillo_version.R
   pkg/RcppArmadillo/R/fastLm.R
   pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R
Log:
using .Cpp

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2010-04-15 10:49:52 UTC (rev 1051)
+++ pkg/RcppArmadillo/DESCRIPTION	2010-04-15 10:55:00 UTC (rev 1052)
@@ -24,6 +24,6 @@
  capabilities of the Rcpp package for seamless R and C++ integration/
 License: GPL (>= 2)
 LazyLoad: yes
-Depends: Rcpp (>= 0.7.11)
+Depends: Rcpp (>= 0.7.11.5)
 LinkingTo: Rcpp
 URL: http://arma.sourceforge.net/, http://dirk.eddelbuettel.com/code/rcpp.html, http://romainfrancois.blog.free.fr/index.php?category/R-package/RcppArmadillo

Modified: pkg/RcppArmadillo/R/armadillo_version.R
===================================================================
--- pkg/RcppArmadillo/R/armadillo_version.R	2010-04-15 10:49:52 UTC (rev 1051)
+++ pkg/RcppArmadillo/R/armadillo_version.R	2010-04-15 10:55:00 UTC (rev 1052)
@@ -16,6 +16,6 @@
 ## along with RcppArmadillo.  If not, see <http://www.gnu.org/licenses/>.
 
 armadillo_version <- function(single = FALSE){
-	.Call( "armadillo_version", isTRUE(single), PACKAGE = "RcppArmadillo" )
+	.Cpp( "armadillo_version", isTRUE(single), PACKAGE = "RcppArmadillo" )
 }
 

Modified: pkg/RcppArmadillo/R/fastLm.R
===================================================================
--- pkg/RcppArmadillo/R/fastLm.R	2010-04-15 10:49:52 UTC (rev 1051)
+++ pkg/RcppArmadillo/R/fastLm.R	2010-04-15 10:55:00 UTC (rev 1052)
@@ -23,7 +23,7 @@
     stopifnot(is.matrix(X))
     stopifnot(nrow(y)==nrow(X))
 
-    res <- .Call("fastLm", y, X, package="RcppArmadillo")
+    res <- .Cpp("fastLm", y, X, package="RcppArmadillo")
 }
 
 ## What would be nice here:

Modified: pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R
===================================================================
--- pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R	2010-04-15 10:49:52 UTC (rev 1051)
+++ pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R	2010-04-15 10:55:00 UTC (rev 1052)
@@ -18,7 +18,7 @@
 # along with RcppArmadillo.  If not, see <http://www.gnu.org/licenses/>.
 
 test.wrap.R <- function(){
-	res <- .Call( "RcppArmadillo_wrap", PACKAGE = "RcppArmadillo" )
+	res <- .Cpp( "RcppArmadillo_wrap", PACKAGE = "RcppArmadillo" )
 
 	checkEquals( res[[1]][[1]], matrix(as.integer((diag(3))),nr=3), msg = "eye<imat>(3,3)" )
 	checkEquals( res[[1]][[2]], diag(3), msg = "eye<mat>(3,3)" )
@@ -36,12 +36,12 @@
 }
 
 test.wrap.Glue <- function(){
-	res <- .Call( "RcppArmadillo_wrap_Glue", PACKAGE = "RcppArmadillo" )
+	res <- .Cpp( "RcppArmadillo_wrap_Glue", PACKAGE = "RcppArmadillo" )
 	checkEquals( res[[1]], 2*diag(3), msg = "wrap(Glue)" )
 }
 
 test.wrap.Op <- function(){
-	res <- .Call( "RcppArmadillo_wrap_Op", PACKAGE = "RcppArmadillo" )
+	res <- .Cpp( "RcppArmadillo_wrap_Op", PACKAGE = "RcppArmadillo" )
 	checkEquals( res[[1]], -1*diag(3), msg = "wrap(Op)" )
 }
 
@@ -49,21 +49,21 @@
 
 	integer_mat <- matrix( as.integer(diag(4)), ncol = 4, nrow = 4 )
 	numeric_mat <- diag(5)
-	res <- .Call( "RcppArmadillo_as_Mat",
+	res <- .Cpp( "RcppArmadillo_as_Mat",
 		list( integer_mat, numeric_mat ),
 		PACKAGE = "RcppArmadillo" )
 	checkEquals( unlist( res), c(4L, 5L, 4L, 5L ), msg = "as<Mat>" )
 }
 
 test.as.Col <- function(){
-	res <- .Call( "RcppArmadillo_as_Col",
+	res <- .Cpp( "RcppArmadillo_as_Col",
 	      list( 1:10, as.numeric(1:10) ),
 	      PACKAGE = "RcppArmadillo" )
 	checkEquals( unlist( res ), rep(55.0, 4 ), msg = "as<Col>" )
 }
 
 test.as.Row <- function(){
-	res <- .Call( "RcppArmadillo_as_Row",
+	res <- .Cpp( "RcppArmadillo_as_Row",
 	      list( 1:10, as.numeric(1:10) ),
 	      PACKAGE = "RcppArmadillo" )
 	checkEquals( unlist( res ), rep(55.0, 4 ), msg = "as<Row>" )
@@ -71,7 +71,7 @@
 
 test.fastLm <- function() {
     data(trees)
-    flm <- .Call("fastLm",
+    flm <- .Cpp("fastLm",
                  log(trees$Volume),
                  cbind(rep(1,31), log(trees$Girth)),
                  PACKAGE="RcppArmadillo")



More information about the Rcpp-commits mailing list