Site icon R-bloggers

Rcpp 0.11.5

[This article was first published on Thinking inside the box , and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The new release 0.11.5 of Rcpp just reached the CRAN network for GNU R, and a Debian package has also been be uploaded.

Rcpp has become the most popular way of enhancing GNU R with C++ code. As of today, 345 packages on CRAN depend on Rcpp for making analyses go faster and further; BioConductor adds another 41 packages, and casual searches on GitHub suggests dozens mores.

This release continues the 0.11.* release cycle, adding another large number of small bug fixes, polishes and enhancements. Since the previous release in January, we incorporated a number of pull requests and changes from several contributors. This time, JJ deserves a special mention as he is responsible for a metric ton of the changes listed below, making Rcpp Attributes even more awesome. As always, you can follow the development via the GitHub repo and particularly the Issue tickets and Pull Requests. And any discussions, questions, … regarding Rcpp are always welcome at the rcpp-devel mailing list.

See below for a detailed list of changes extracted from the NEWS file.

Changes in Rcpp version 0.11.5 (2015-03-04)

  • Changes in Rcpp API:

    • An error handler for tinyformat was defined to prevent the assert() macro from spilling.

    • The Rcpp::warning function was added as a wrapper for Rf_warning.

    • The XPtr class was extended with new checked_get and release functions as well as improved behavior (throw an exception rather than crash) when a NULL external pointer is dereferenced.

    • R code is evaluated within an R_toplevelExec block to prevent user interrupts from bypassing C++ destructors on the stack.

    • The Rcpp::Environment constructor can now use a supplied parent environment.

    • The Rcpp::Function constructor can now use a supplied environment or namespace.

    • The attributes_hidden macro from R is used to shield internal functions; the R_ext/Visibility.h header is now included as well.

    • A Rcpp::print function was added as a wrapper around Rf_PrintValue.

  • Changes in Rcpp Attributes:

    • The pkg_types.h file is now included in RcppExports.cpp if it is present in either the inst/include or src.

    • sourceCpp was modified to allow includes of local files (e.g. #include "foo.hpp"). Implementation files (.cc; .cpp) corresponding to local includes are also automatically built if they exist.

    • The generated attributes code was simplified with respect to RNGScope and now uses RObject and its destructor rather than SEXP protect/unprotect.

    • Support addition of the rng parameter in Rcpp::export to suppress the otherwise automatic inclusion of RNGScope in generated code.

    • Attributes code was made more robust and can e.g. no longer recurse.

    • Version 3.2 of the Rtools is now correctly detected as well.

    • Allow ‘R’ to come immediately after ‘***’ for defining embedded R code chunks in sourceCpp.

    • The attributes vignette has been updated with documentation on new features added over the past several releases.

  • Changes in Rcpp tests:

    • On Travis CI, all build dependencies are installed as binary .deb packages resulting in faster tests.

  • Thanks to CRANberries, you can also look at a diff to the previous release As always, even fuller details are on the Rcpp Changelog page and the Rcpp page which also leads to the downloads page, 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.

    This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

    To leave a comment for the author, please follow the link and comment on their blog: Thinking inside the box .

    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.