[Rcpp-commits] r2863 - in pkg/RcppBDT: . R demo man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 12 21:17:24 CET 2011


Author: edd
Date: 2011-01-12 21:17:22 +0100 (Wed, 12 Jan 2011)
New Revision: 2863

Added:
   pkg/RcppBDT/cleanup
Modified:
   pkg/RcppBDT/ChangeLog
   pkg/RcppBDT/R/zzz.R
   pkg/RcppBDT/demo/RcppBDT.R
   pkg/RcppBDT/man/bdt.Rd
Log:
import the module, and construct from $date component
demo and manual page update accordingly
added cleanup script


Modified: pkg/RcppBDT/ChangeLog
===================================================================
--- pkg/RcppBDT/ChangeLog	2011-01-11 19:47:58 UTC (rev 2862)
+++ pkg/RcppBDT/ChangeLog	2011-01-12 20:17:22 UTC (rev 2863)
@@ -1,7 +1,14 @@
+2011-01-12  Dirk Eddelbuettel  <edd at debian.org>
+
+	* R/zzz.R (.onLoad): import module, construct from class 'date'
+	* demo/RcppBDT.R: adjusted accordingly
+
+	* cleanup: added simple cleanup script
+
 2011-01-11  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION (Version): bumped version to 0.0.3
-	
+
 	* R/zzz.R: change initialization after borrowing a better approach
 	from John's wls package in the Rcpp repo on R-Forge: now 'bdt' is
 	the default instance of the reference class, and the module code is

Modified: pkg/RcppBDT/R/zzz.R
===================================================================
--- pkg/RcppBDT/R/zzz.R	2011-01-11 19:47:58 UTC (rev 2862)
+++ pkg/RcppBDT/R/zzz.R	2011-01-12 20:17:22 UTC (rev 2863)
@@ -64,8 +64,8 @@
     require(methods, quiet=TRUE, warn=FALSE)
 
     unlockBinding("bdt", .NAMESPACE)    	# unlock
-    bdtMod <- Module( "bdt" )$date		# get the module code
-    bdt <- new(bdtMod)                  	# default constructor for reference instance
+    bdtMod <- Module( "bdt" )			# get the module code
+    bdt <- new( bdtMod$date )                  	# date class default constructor for reference instance
     bdt$setFromUTC()                    	# but set a default value
     assign("bdt", bdt, .NAMESPACE)      	# assign the reference instance
     assign("bdtMod", bdtMod, .NAMESPACE)  	# and the module

Added: pkg/RcppBDT/cleanup
===================================================================
--- pkg/RcppBDT/cleanup	                        (rev 0)
+++ pkg/RcppBDT/cleanup	2011-01-12 20:17:22 UTC (rev 2863)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+rm -f src/*.o src/*.so


Property changes on: pkg/RcppBDT/cleanup
___________________________________________________________________
Added: svn:executable
   + *

Modified: pkg/RcppBDT/demo/RcppBDT.R
===================================================================
--- pkg/RcppBDT/demo/RcppBDT.R	2011-01-11 19:47:58 UTC (rev 2862)
+++ pkg/RcppBDT/demo/RcppBDT.R	2011-01-12 20:17:22 UTC (rev 2863)
@@ -5,12 +5,13 @@
 
     ## this uses the pretty-printing the Rcpp module logic to show all
     ## available functions and their docstring (symbol is not exported)
-    #print(bdtMod)
+    ##
+    ## print(bdtMod$date)
 
     ## we use a base object 'bdt' for the functions below
     ## by using the instance stored in the environment
     ##
-    ## alternatively could construct a new instance from bdtMod, see R/zzz.R
+    ## alternatively could construct a new instance from bdtMod$date, see R/zzz.R
 
     cat("Demo of setters\n");
     ## conversions from string commented out, see inst/include/RcppBDT.h for details

Modified: pkg/RcppBDT/man/bdt.Rd
===================================================================
--- pkg/RcppBDT/man/bdt.Rd	2011-01-11 19:47:58 UTC (rev 2862)
+++ pkg/RcppBDT/man/bdt.Rd	2011-01-12 20:17:22 UTC (rev 2863)
@@ -4,11 +4,12 @@
 \docType{package}
 \title{Default object for RcppBDT Boost Date_Time binding}
 \description{
-  The \verb{bdt} variable is a default instance of the reference class
+  The \verb{bdt} variable is a default instance of the 'date' class
   created by means of Rcpp modules.
 
   The \verb{bdtMod} variable is an instance of the class created by Rcpp
-  modules; see \code{print(bdtMod)} for available methods.
+  modules. It currently contains just the \code{date} class; see
+  \code{print(bdtMod$date)} for its available methods. 
   
   New instances can be created using either the default constructor
   (without argument) or the constructor using year, month, date arguments.



More information about the Rcpp-commits mailing list