Rcpp 0.8.1
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
There are a few fairly visible new things in this release. As we want to focus the next few minor releases on completing the documentation, we started by adding a total of four (!!) new vignettes:
- Rcpp-package showing how to write your own package using Rcpp,
- Rcpp-FAQ addressing several frequently asked questions,
- Rcpp-modules discussing how to expose C++ functions and modules with ease using an idea borrowed from Boost::Python, and
- Rcpp-extending detailing the steps needed to extend Rcpp with user-provided or third-party classes,
The most interesting new feature is what we call Rcpp modules and is modeled after Boost::Python. This makes it pretty easy to expose C++ functions and classes to R — without having to write glue code. This is pretty new and may change a tad over the coming releases, but it is also quite exciting.
Other changes concern more improvements for use of inline which should now allow packages like our RcppArmadillo to be used with it, and some bug fixes. The full NEWS entry for this release follows below:
0.8.1 2010-06-08 o This release adds Rcpp modules. An Rcpp module is a collection of internal (C++) functions and classes that are exposed to R. This functionality has been inspired by Boost.Python. Modules are created internally using the RCPP_MODULE macro and retrieved in the R side with the Module function. This is a preview release of the module functionality, which will keep improving until the Rcpp 0.9.0 release. The new vignette "Rcpp-modules" documents the current feature set of Rcpp modules. o The new vignette "Rcpp-package" details the steps involved in making a package that uses Rcpp. o The new vignette "Rcpp-FAQ" collects a number of frequently asked questions and answers about Rcpp. o The new vignette "Rcpp-extending" documents how to extend Rcpp with user defined types or types from third party libraries. Based on our experience with RcppArmadillo o Rcpp.package.skeleton has been improved to generate a package using an Rcpp module, controlled by the "module" argument o Evaluating a call inside an environment did not work properly o cppfunction has been withdrawn since the introduction of the more flexible cxxfunction in the inline package (0.3.5). Rcpp no longer depends on inline since many uses of Rcpp do not require inline at all. We still use inline for unit tests but this is now handled locally in the unit tests loader runTests.R. Users of the now-withdrawn function cppfunction can redefine it as: cppfunction <- function(...) cxxfunction( ..., plugin = "Rcpp" ) o Support for std::complex was incomplete and has been enhanced. o The methods XPtr::getTag and XPtr::getProtected are deprecated, and will be removed in Rcpp 0.8.2. The methods tag() and prot() should be used instead. tag() and prot() support both LHS and RHS use. o END_RCPP now returns the R Nil values; new macro VOID_END_RCPP replicates prior behabiour
As always, even fuller details are in Rcpp Changelog page and the Rcpp page which also leads to the downloads, the browseable doxygen docs and zip files of doxygen output for the standard formats. A local directory has source and documentation too. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.