[Rcpp-commits] r1916 - pkg/Rcpp/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 5 17:15:37 CEST 2010


Author: edd
Date: 2010-08-05 17:15:37 +0200 (Thu, 05 Aug 2010)
New Revision: 1916

Modified:
   pkg/Rcpp/inst/unitTests/runit.stats.R
Log:
added two missing parens


Modified: pkg/Rcpp/inst/unitTests/runit.stats.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.stats.R	2010-08-05 11:55:05 UTC (rev 1915)
+++ pkg/Rcpp/inst/unitTests/runit.stats.R	2010-08-05 15:15:37 UTC (rev 1916)
@@ -20,30 +20,30 @@
 .setUp <- function(){
 	if( ! exists( ".rcpp.stats", globalenv() ) ){
 		# definition of all the functions at once
-		
-		f <- list( 
-			"runit_dbinom" = list( 
-				signature( x = "integer" ), 
+
+		f <- list(
+			"runit_dbinom" = list(
+				signature( x = "integer" ),
 				'
 					IntegerVector xx(x) ;
-					return List::create( 
-						_["false"] = stats::dbinom( xx, 10, .5), 
+					return List::create(
+						_["false"] = stats::dbinom( xx, 10, .5),
 						_["true"]  = stats::dbinom( xx, 10, .5, true )
-						) ; 
+						) ;
 				'
-			), 
-			"runit_dpois" = list( 
-				signature( x = "integer" ), 
+			),
+			"runit_dpois" = list(
+				signature( x = "integer" ),
 				'
 					IntegerVector xx(x) ;
-					return List::create( 
-						_["false"] = stats::dpois( xx, .5 ), 
+					return List::create(
+						_["false"] = stats::dpois( xx, .5 ),
 						_["true"]  = stats::dpois( xx, .5 , true )
-						) ; 
+						) ;
 				'
 			),
 		)
-		
+
 		signatures <- lapply( f, "[[", 1L )
 		bodies <- lapply( f, "[[", 2L )
 		fx <- cxxfunction( signatures, bodies, plugin = "Rcpp")
@@ -54,13 +54,13 @@
 
 test.stats.dbinom <- function( ){
 	fx <- .rcpp.stats$runit_dbinom
-	checkEquals( fx(1:10) , 
-	list( false = dbinom(1:10, 10, .5), true = dbinom(1:10, 10, .5, TRUE ) )
+	checkEquals( fx(1:10) ,
+                list( false = dbinom(1:10, 10, .5), true = dbinom(1:10, 10, .5, TRUE ) ) )
 }
 
 test.stats.dpois <- function( ){
 	fx <- .rcpp.stats$runit_dpois
-	checkEquals( fx(0:5) , 
-	list( false = dpois(0:5, .4), true = dpois(0:5, .4, TRUE ) )
+	checkEquals( fx(0:5) ,
+                list( false = dpois(0:5, .4), true = dpois(0:5, .4, TRUE ) ) )
 }
-   
+



More information about the Rcpp-commits mailing list