[Rcpp-commits] r3561 - pkg/RcppBDT/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 30 19:41:10 CEST 2012


Author: romain
Date: 2012-03-30 19:41:09 +0200 (Fri, 30 Mar 2012)
New Revision: 3561

Modified:
   pkg/RcppBDT/R/zzz.R
Log:
somewhat better, but not there yet

Modified: pkg/RcppBDT/R/zzz.R
===================================================================
--- pkg/RcppBDT/R/zzz.R	2012-03-30 17:11:25 UTC (rev 3560)
+++ pkg/RcppBDT/R/zzz.R	2012-03-30 17:41:09 UTC (rev 3561)
@@ -23,14 +23,16 @@
     x <- new( bdtMod$date ); x$setFromUTC(); x 
 }) )                                                                        
 
-    
 
+.format_date <- function(x, ...) format(x$getDate(), ...)
+.show_date <- function(object) print(object$getDate())
+
 .onLoad <- function (lib, pkg) {
-    loadRcppModules( direct = FALSE )
+    loadRcppModules(direct=FALSE)
     
-    setMethod("show", "Rcpp_date", function(object) print(object$getDate()))
+    setMethod("show", "Rcpp_date", .show_date)
     setGeneric( "format", function(x,...) standardGeneric("format") )
-    setMethod("format", "Rcpp_date", function(x, ...) format(x$getDate(), ...))
+    setMethod("format", "Rcpp_date", .format_date )
 
 }
 



More information about the Rcpp-commits mailing list