[Rcpp-commits] r2864 - in pkg/RcppBDT: . R

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


Author: edd
Date: 2011-01-12 21:29:16 +0100 (Wed, 12 Jan 2011)
New Revision: 2864

Added:
   pkg/RcppBDT/R/constants.R
Modified:
   pkg/RcppBDT/ChangeLog
   pkg/RcppBDT/R/zzz.R
Log:
date constants are now in their own .R file


Modified: pkg/RcppBDT/ChangeLog
===================================================================
--- pkg/RcppBDT/ChangeLog	2011-01-12 20:17:22 UTC (rev 2863)
+++ pkg/RcppBDT/ChangeLog	2011-01-12 20:29:16 UTC (rev 2864)
@@ -3,6 +3,8 @@
 	* R/zzz.R (.onLoad): import module, construct from class 'date'
 	* demo/RcppBDT.R: adjusted accordingly
 
+	* R/constants.R: define date constants here and not in zzz.R
+
 	* cleanup: added simple cleanup script
 
 2011-01-11  Dirk Eddelbuettel  <edd at debian.org>

Added: pkg/RcppBDT/R/constants.R
===================================================================
--- pkg/RcppBDT/R/constants.R	                        (rev 0)
+++ pkg/RcppBDT/R/constants.R	2011-01-12 20:29:16 UTC (rev 2864)
@@ -0,0 +1,51 @@
+##
+## constants.R: Convenience constants for date calculation
+##
+## Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+##
+## This file is part of RcppBDT.
+##
+## RcppBDT is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 2 of the License, or
+## (at your option) any later version.
+##
+## RcppBDT is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with RcppBDT.  If not, see <http://www.gnu.org/licenses/>.
+
+## a simple alternative to enum type in C++ -- we could also have
+## these as parts of a data.frame
+Sun <- 0
+Mon <- 1
+Tue <- 2
+Wed <- 3
+Thu <- 4
+Fri <- 5
+Sat <- 6
+
+## likewise, identifiers for the months
+Jan <- 1
+Feb <- 2
+Mar <- 3
+Apr <- 4
+May <- 5
+Jun <- 6
+Jul <- 7
+Aug <- 8
+Sep <- 9
+Oct <- 10
+Nov <- 11
+Dec <- 12
+
+## and for sequences
+first <- 1
+second <- 2
+third <- 3
+fourth <- 4
+fifth <- 5
+


Property changes on: pkg/RcppBDT/R/constants.R
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:eol-style
   + native

Modified: pkg/RcppBDT/R/zzz.R
===================================================================
--- pkg/RcppBDT/R/zzz.R	2011-01-12 20:17:22 UTC (rev 2863)
+++ pkg/RcppBDT/R/zzz.R	2011-01-12 20:29:16 UTC (rev 2864)
@@ -27,37 +27,6 @@
 # dummy module, will be replaced later
 bdt <- new( "Module" )
 
-## a simple alternative to enum type in C++ -- we could also have
-## these as parts of a data.frame
-Sun <- 0
-Mon <- 1
-Tue <- 2
-Wed <- 3
-Thu <- 4
-Fri <- 5
-Sat <- 6
-
-## likewise, identifiers for the months
-Jan <- 1
-Feb <- 2
-Mar <- 3
-Apr <- 4
-May <- 5
-Jun <- 6
-Jul <- 7
-Aug <- 8
-Sep <- 9
-Oct <- 10
-Nov <- 11
-Dec <- 12
-
-## and for sequences
-first <- 1
-second <- 2
-third <- 3
-fourth <- 4
-fifth <- 5
-
 .onLoad <- function (lib, pack) {
 
     ## we need the methods package



More information about the Rcpp-commits mailing list