A new release of the RcppBDT package appeared on CRAN earlier today.
RcppBDT uses Rcpp, and in particular the nifty Rcpp modules feature of wrapping C++ code for R just by declaring the (class or function) interfaces. It uses this to bring in some useful functions from Boost Date.Time to R so that one can do things like
to compute the next five Labor Day dates in the US, given the year and the first Monday of September requirement. More examples are e.g. on the earlier blog post announcing version 0.1.0.R> library(RcppBDT) R> sapply(2012:2016, function(year) + format(getNthDayOfWeek(first, Mon, Sep, year)))  "2012-09-03" "2013-09-02" "2014-09-01" "2015-09-07" "2016-09-05" R>
Changes are mostly internal. R 2.15.1 brough a better / easier way to load such ‘modules’ into R, and Rcpp 0.9.13 allows us to use this. So RcppBDT continues to be useful as an example package for Rcpp modules. I also streamlines the interface a little: identifiers are now directly accessible in the package’s NAMESPACE rather than just via the an instantiated object.
I also added a NEWS file, using the
.Rd format so that we can
import the marked-up text:
News for Package RcppBDT
Changes in version 0.2.0 (2012-07-02)
The core module, which wraps what in C++ is boost::gregorian::date, is now exposed as an Rcpp module bdtDate. As all example and demos operated off a (package-global) variable ‘bdt’, no user visible change was needed outside of the code instantiating at package load.
Updated package instantiation to the new facilities offered by the current versions R 2.15.1 and Rcpp 0.9.13 which make Rcpp module initialization easier and more streamlined.
Changes in version 0.1.0 (2011-01-17)
First CRAN upload (and see ChangeLog for more granular details) bug fix in svm cross validation
Courtesy of CRANberries, there is also a diffstat report for 0.2.0 relative to 0.1.0. As always, feedback is welcome and the rcpp-devel mailing list off the R-Forge page for Rcpp is the best place to start a discussion.