Sat, 12 Jul 2014

RcppArmadillo 0.4.320.0

While I was out at the (immensely impressive and equally enjoyable) useR! 2014 conference at UCLA, Conrad provided a bug-fix release 4.320 of Armadillo, the nifty templated C++ library for linear algebra. I quickly rolled that into RcppArmadillo release 0.4.320.0 which has been on CRAN and in Debian for a good week now.

This release fixes some minor things with sparse and dense Eigen solvers (as well as one RNG issue probably of lesser interest to R users deploying the RNGs from R) as shown in the NEWS entry below.

Changes in RcppArmadillo version 0.4.320.0 (2014-07-03)

  • Upgraded to Armadillo release Version 4.320 (Daintree Tea Raider)

    • expanded eigs_sym() and eigs_gen() to use an optional tolerance parameter

    • expanded eig_sym() to automatically fall back to standard decomposition method if divide-and-conquer fails

    • automatic installer enables use of C++11 random number generator when using gcc 4.8.3+ in C++11 mode

Courtesy of CRANberries, there is also a diffstat report for the most recent release. As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Mon, 09 Jun 2014

Introducing RcppRedis

RcppRedis, another new package of mine, appeared on CRAN a few weeks ago just in time for our annual R/Finance conference.

And as of today, we also have Windows binaries thanks to generous help from John Buonagurio who help building the required 32- and 64-bit libraries for Windows, and Uwe Ligges who now installed them for the CRAN and win-builder machiness. Binaries for release 0.1.1 should be available within a day.

To describe the package, I also just set up a page about RcppRedis so rather than repeating everything here I invite you to follow the link.

The ever-so-brief NEWS entry for the two first uploads follows.

Changes in version 0.1.1 (2014-06-09)

  • Now with Windows support thanks to the installation of builds of the hiredis library (created by John Buonagurio) at CRAN / win-builder (thanks to Uwe Ligges)

  • Added support for new command zcount

Changes in version 0.1.0 (2014-05-10)

  • Initial CRAN upload

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

/code/rcpp | permanent link

Sun, 08 Jun 2014

Rcpp 0.11.2

A new minor release 0.11.2 of Rcpp is now on the CRAN network for GNU R, and binaries for Debian have also been uploaded.

The release smoothes a few edges on both the Rcpp side itself, as well as on the interaction between Rcpp and R which since release 3.1.0 offers a few new features related to C++11.

Kevin added a couple of neat extensions related to vectors, a new ListOf templated list class, as well as a new option to warn on implicit casts. We decided not to make this option the default as it may be too common in some packages. JJ took care of a few buglets related to the wonderful Rcpp Attributes. See the NEWS file section below for details, or the ChangeLog file in the package and on the Rcpp Changelog page. Note that the diffstat reported by CRANberries is very large as Kevin also committed a whitespace cleanup which touched almost all files.

As before, we tested this release by building against all CRAN packages which depend upon Rcpp. In fact we did three such runs leading up to the release. Only one package was blacklisted (as I currently don't have CUDA set-up), two had what may be internal errors or tests which were too restrictive, sixteen suffered from missing packages or RGL devices --- but the remaining 202 packages all built and tested cleanly. Detailed results of those tests (and the scripts for it) are in the rcpp-logs repo GitHub.

There are a number of other fixes, upgrades and other extensions detailed in NEWS file extract below, in the ChangeLog file in the package and on the Rcpp Changelog page.

Changes in Rcpp version 0.11.2 (2014-06-06

  • Changes in Rcpp API:

    • Implicit conversions, e.g. between NumericVector and IntegerVector, will now give warnings if you use #define RCPP_WARN_ON_COERCE before including the Rcpp headers.

    • Templated List containers, ListOf<T>, have been introduced. When subsetting such containers, the return is assumed to be of type T, allowing code such as ListOf<NumericVector> x; NumericVector y = x[0] + x[1] + x[2].

    • In a number of instances, returned results are protected and/or cast more carefully.

  • Changes in Rcpp Attributes

    • Trailing line comments are now stripped by the attributes parser. This allows the parser to handle C++ source files containing comments inline with function arguments.

    • The USE_CXX1X environment variable is now defined by the cpp11 plugin when R >= 3.1. Two additional plugins have been added for use with C++0x (eg when using g++ 4.6.* as on Windows) as well as C++1y for compilers beginning to support the next revision of the standard; additional fallback is provided for Windows.

    • compileAttributes() now also considers Imports: which may suppress a warning when running Rcpp.package.skeleton().

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, 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.

/code/rcpp | permanent link

Wed, 04 Jun 2014

RcppArmadillo 0.4.300.8.0

A new minor / bug fix release 4.300.8 of Armadillo, the templated C++ library for linear algebra, was tagged by Conrad in his SVN repo a few days ago, following earlier snapshots in the 4.300.* series.

We had prepared two earlier releases for GitHub but not CRAN in order to accomodate the CRAN maintainer's desire of "a release every one to two months" expressed in the CRAN Repo Policy. However, two actual bugs in the interaction between MinGW and C++11 were reported on the rcpp-devel mailing list, and this releases addresses these. Hence time for new release 0.4.300.8.0 of RcppArmadillo which is now on CRAN and in Debian.

This release brings a few upstream changes detailed below such as nice new upstream changes such as more robust norm() (and related) functions, and fixes related to matrix and cube interactions. From our end, we added a better detection of Windows via both _WIN32 and WIN32 (as the former apparently gets undefined by MinGW in C++11 mode). We also added the ability to turn on C++11 support from R (possible since R 3.1.0) yet also turn it off for Armadillo. This is needed as the prescribed compiler on Windows is g++ 4.6.2 -- which offers a subset of C++11 which is good enough for a number of things from the C++11 standard, but not advanced enough for everything which Armadillo uses when C++11 support is turned on. As Armadillo continues to offer a choice of C++ standards, we can use the ability to deploy C++11 only outside of its internals. It is worth repeating that this issue should only affect Windows users wishing to use C++11; other platforms are fine as they generally have more modern compilers.

Changes in RcppArmadillo version 0.4.300.8.0 (2014-05-31)

  • Upgraded to Armadillo release Version 4.300.8 (Medieval Cornea Scraper)

    • More robust norm-related functions

    • Fixes between interactions between cube and vector types.

  • Adds a #define ARMA_DONT_USE_CXX11 to provide an option to turn C++11 off for Armadillo (but client packages may still use it)

  • More robust Windows detection by using _WIN32 as well as WIN32 as the latter gets diabled by MinGW with C++11

  • On Windows, C++11 can be turned off as the Armadillo code base uses more features of C++11 than g++ 4.6.2 version in Rtools implements

Changes in RcppArmadillo version 0.4.300.5.0 (2014-05-19)

  • Upgraded to Armadillo release Version 4.300.5 (Medieval Cornea Scraper)

    • Handle possible underflows and overflows in norm(), normalise(), norm_dot()

    • Fix for handling of null vectors by norm_dot()

Changes in RcppArmadillo version 0.4.300.2.0 (2014-05-13)

  • Upgraded to Armadillo release Version 4.300.2 (Medieval Cornea Scraper)

    • faster find()

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Sat, 31 May 2014

RcppGSL 0.2.1 and 0.2.2

A few days ago, version 0.2.1 of RcppGSL---our interface package between R and the GNU GSL using our Rcpp package for seamless R and C++ integration---appeared on CRAN making it the first release in some time.

And it turned that this version tickled an obscure and long-dormant bug under clang which was found on OS X Mavericks---which Kevin Ushey consequently squashed. So this is now reflected in version 0.2.2 which just arrived on CRAN.

Besides the bugfix, a few things were modernized to reflect capabilities of Rcpp 0.11.0 and later. The releases also contain a few changes that had accumulated since the previous release in 2012 such as an additional example using B-splines, and use of updated vignette build options provided by R.

The NEWS file entries follows below:

Changes in version 0.2.2 (2014-05-31)

  • A subtle bug (tickled only by clang on some OS versions) in vector and matrix view initialization was corrected by Kevin Ushey

Changes in version 0.2.1 (2014-05-26)

  • Added new example based on B-splines example in GSL manual illustrating simple GSL use via Rcpp attributes

  • Vignette compilation has been reverted to using highlight since version 0.4.2 or greater can be used as a vignette engine (with R 3.0.* or later).

  • Vignette compilation is now being done by R CMD build as R 3.0.0 supports different vignette engines, so the vignette build process has been simplified. A convenience helper script has also been added for command-line builds.

  • Unit tests now use sourceCpp() instead of cxxfunction() from the inline package

  • The DESCRIPTION file now uses Suggests: Rcpp (instead of Depends: Rcpp) to permit building of the vignette

  • The package now takes advantage of the simplified build process available with Rcpp (>= 0.11.0)

  • Similar updates to the build process were made for the example package included with RcppGSL

And courtesy of CRANberries, a summaries of changes to release 0.2.0 and this week's release 0.2.1 are available.

More information is on the RcppGSL page. 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.

/code/rcpp | permanent link

Mon, 12 May 2014

Updated list of upcoming Rcpp talks and workshops

This is an updated version of an earlier post in March.

A number of talks about Rcpp are scheduled over the next couple of months:

  • On Wednesday May 14 I will be speaking at the Chicago R Users Group meeting charmingly titled Warm Up for R/Finance, along with fellow R/Finance organizer Josh Ulrich, fellow R/Finance regular Kent Hosxey as well as Cliff Clive. I will talk about Redis and my rather recent nascent RcppRedis package.
  • Our sixth international conference R/Finance will take place May 16 and 17, 2014, at UIC in Chicago. See the current agenda for details of the program---which once again will be preceded by one-hour workshops. And as in the past, I will offer a one-hour gentle introduction to Rcpp. This workshop requires registration and a fee, and registraion will close shortly. I will also present a short lightning talk about the RcppRedis package as part of the conference proper.
  • A few days later, on May 20, 2014, I will present a one-hour webinar which is part of a series organized by Ray DiGiacomo and the Orange County R Users Group. See this page for details and registration information; the talk itself will be free of charge.
  • Later in the month, on May 30, 2014, I will give a talk / guest lecture about Rcpp and RcppArmadillo and over in Economics at the University of Chicago. I reckon that this event is not open to anybody not part of U of C.
  • Another three-hour tutorial is scheduled for the tutorial day preceding useR! 2014 at UCLA in early July. This tutorial will also require registration as part of the annual useR! conference. I am very honoured to have been asked to give one of the invited keynotes at useR! 2014. The talk may (or may not) cover at least some aspects of Rcpp. As my talk proposal about the recent RcppZiggurat package for faster Normal RNGs was accepted, I will also give a regular conference talk.

So the month of June remains pretty open. If someone wants me to talk somewhere else, preferably on a Saturday, feel free to get in touch.

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

/code/rcpp | permanent link

Tue, 06 May 2014

RcppEigen 0.3.2.1.2

A bug-fix release 0.3.2.1.2 is of RcppEigen is now on CRAN and in Debian. It contains a short upstream patch by Gaek Guennebaud for the UBSAN warnings that were flagged at CRAN (from a rather harmless cpu-id comparison).

The NEWS entry follows.

Changes in RcppEigen version 0.3.2.1.2 (2014-05-05)

  • Applied upstream patch to not trigger g++ UBSAN warning on the cpu id comparison, with thanks to Gael Guennebaud for the patch

Courtesy of CRANberries, there are diffstat reports for the most recent release.

Questions, comments etc about RcppEigen 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.

/code/rcpp | permanent link

Mon, 05 May 2014

RcppArmadillo 0.4.300.0

A new release 4.300 of Armadillo, the templated C++ library for linear algebra, was released by Conrad a few days ago.

As usual, this was rolled up in a new RcppArmadillo release 0.4.300.0 which is now on CRAN and in Debian.

This release brings nice new upstream changes such as faster find() as well as corresponding functions to find elements which are either finite or non-finite, based on a suggestion we made. This may need an RcppArmadillo specific extension as R extends the IEEE logic to supported NA, NaN and Inf on floating point variables whereas standard C++ (and hence Armadillo) only supports the latter two. We hope to work on this shortly.

Kevin also put in some code to make sure unsigned int vectors and matrices are converted correctly, and I updated the short configure script checking for complete LAPACK support to account for the R 3.0.3 or later case.

Changes in RcppArmadillo version 0.4.300.0 (2014-05-04)

  • Upgraded to Armadillo release Version 4.300 (Medieval Cornea Scraper)

    • faster find()

    • added find_finite() and find_nonfinite() for finding indices of finite and non-finite elements

    • expressions X=inv(A)*B*C and X=A.i()*B*C are automatically converted to X=solve(A,B*C)

  • Corrected conversion to unsigned int vectors and matrices

  • Configure script now checks for R version 3.0.3 or newer to enable complex divide-and-conquer SVD in case of R-supplied LAPACK

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Sat, 03 May 2014

RcppSMC 0.1.3 and 0.1.4

The very useful Valgrind tool had flagged an actual error in the package which the CRAN maintainers asked us to address. This was followed by a minor brown-bad oversight of a missing delete, also tagged by Valgrind. Both are pretty ancient bugs which we probably should have found aeons ago. Releases 0.1.3 and 0.1.4 made it to CRAN yesterday in short succession.

To recap, RcppSMC combines the SMCTC template classes for Sequential Monte Carlo and Particle Filters (Johansen, 2009, JSS) with the Rcpp package for R/C++ Integration (Eddelbuettel and Francois, 2011, JSS) and thereby allows for easier and more direct access from R to the computational core of the Sequential Monte Carlo algorithm.

The two NEWS entries are below:

Changes in RcppSMC version 0.1.4 (2014-05-02)

  • Added missing delete operator to destructor in sampler

Changes in RcppSMC version 0.1.3 (2014-05-01)

  • Bugfix in Sampler.iterate() for memory overrun detected by valgrind

Courtesy of CRANberries, there are also diffstat reports for 0.1.3. and 0.1.4. As always, more detailed information is on the RcppSMC 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.

/code/rcpp | permanent link

Sun, 13 Apr 2014

RcppBDT 0.2.3

A new release of the RcppBDT package is now on CRAN.

Several new modules were added; the package can now work on dates, date durations, "ptime" (aka posix time), and timezones. Most interesting may be the fact that ptime is configured to use 96 bits. This allows a precise representation of dates and times down to nanoseconds, and permits date and time calculations at this level.

The complete NEWS entry is below:

Changes in version 0.2.3 (2014-04-13)

  • New module 'bdtDt' replacing the old 'bdtDate' module in a more transparent style using a local class which is wrapped, just like the three other new classes do

  • New module 'bdtTd' providing date durations which can be added to dates.

  • New module 'bdtTz' providing time zone information such as offset to UTC, amount of DST, abbreviated and full timezone names.

  • New module 'bdtDu' using 'posix_time::duration' for time durations types

  • New module 'bdtPt' using 'posix_time::ptime' for posix time, down to nanosecond granularity (where hardware and OS permit it)

  • Now selects C++11 compilation by setting CXX_STD = CXX11 in src/Makevars* and hence depend on R 3.1.0 or later – this gives gives us long long needed for the nano-second high-resolution time calculations across all builds and platforms.

Courtesy of CRANberries, there is also a diffstat report for the lastest release. 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.

Update: I just learned the hard way that the combination of 32-bit OS, g++ at version 4.7 or newer and a Boost version of 1.53 or 1.54 does not work with this new upload. Some Googling suggests that this ought to be fixed in Boost 1.54; seemingly it isn't as our trusted BH package with Boost headers provides that very version 1.54. However, the Googling also suggested a quick two-line fix which I just committed in the Github repo. A new BH package with the fix may follow in a few days.

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

/code/rcpp | permanent link

Thu, 10 Apr 2014

RcppCNPy 0.2.3

R 3.1.0 came out today. Among the (impressive and long as usual) list of changes is the added ability to specify CXX_STD = CXX11 in order to get C++11 (or the best available subset on older compilers). This brings a number of changes and opportunities which are frankly too numerous to be discussed in this short post. But it also permits us, at long last, to use long long integer types.

For RcppCNPy, this means that we can finally cover NumPy integer data (along with the double precision we had from the start) on all platforms. Python encodes these as an int64, and that type was unavailable (at least in 32-bit OSs) until we got long long made available to us by R. So today I made the change to depend on R 3.1.0, and select C++11 which allowed us to free the code from a number if #ifdef tests. This all worked out swimmingly and the new package has already been rebuilt for Windows.

I also updated the vignette, and refreshed its look and feel. Full changes are listed below.

Changes in version 0.2.3 (2014-04-10)

  • src/Makevars now sets CXX_STD = CXX11 which also provides the long long type on all platforms, so integer file support is no longer conditional.

  • Consequently, code conditional on RCPP_HAS_LONG_LONG_TYPES has been simplified and is no longer conditional.

  • The package now depends on R 3.1.0 or later to allow this.

  • The vignette has been updated and refreshed to reflect this.

CRANberries also provides a diffstat report for the latest release. 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.

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

/code/rcpp | permanent link

Mon, 07 Apr 2014

RcppArmadillo 0.4.200.0

Conrad released a new upstream release 4.200 for Armadillo, his templated C++ library for linear algebra, earlier today.

As usual, this was rolled up in a new RcppArmadillo release 0.4.200.0; I had actually made two pre-releases leading up his 4.200 release and was hence not expecting any surprises. Prior to uploading to CRAN, I also tested against all 61 reverse dependencies of the package. Last but not least, I also updated the corresponding Debian package.

Changes in RcppArmadillo version 0.4.200.0 (2014-04-07)

  • Upgraded to Armadillo release Version 4.200 (Flintlock Swoop)

    • faster transpose of sparse matrices

    • more efficient handling of aliasing during matrix multiplication

    • faster inverse of matrices marked as diagonal

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Thu, 27 Mar 2014

Upcoming Rcpp talks and workshops

A number of talks about Rcpp are scheduled over the next couple of months:

  • Our sixth internation conference R/Finance, will take place May 16 and 17, 2014, at UIC in Chicago. See the current draft agenda for details of the program---which once again will be preceded by one-hour workshops. And as in the past, I will offer a one-hour gentle introduction to Rcpp. This workshop requires registration and a fee, and registraion details should be available at the conference website in the next few days.
  • A few days later, on May 20, 2014, I will present a one-hour webinar which is part of a series organized by Ray DiGiacomo and the Orange County R Users Group. See this page for details and registration information; the talk itself will be free of charge.
  • Later in the month, on May 30, 2014, I will give a talk / guest lecture about Rcpp and RcppArmadillo and over in Economics at the University of Chicago. I reckon that this event is not open to anybody not part of U of C.
  • Another three-hour tutorial is scheduled for the tutorial day preceding useR! 2014 at UCLA in early July. This tutorial will also require registration as part of the annual useR! conference.
  • Last but not least I am very honoured to have been asked to give one of the invited keynotes at useR! 2014. The talk may (or may not) cover at least some aspects of Rcpp.

So the month of June is still pretty open. If someone wants me to talk somewhere else, preferably on a Saturday, feel free to get in touch.

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

/code/rcpp | permanent link

Fri, 14 Mar 2014

Rcpp 0.11.1

A new minor release 0.11.1 of Rcpp is now on the CRAN network for GNU R; binaries for Debian have also been uploaded.

The release fixes a number of bugs that have come up since the 0.11.0 release in January, but also brings some extensions. See the NEWS file section below for details, or the ChangeLog file in the package and on the Rcpp Changelog page

Once again, we tested this release by building against all CRAN packages which depend upon Rcpp. In short, three packages are blacklisted from tests, and three came up with something we noted --- but the remaining 177 packages all build and test cleanly. Detailed results of those tests (and the scripts for it) are on GitHub.

There are a number of other fixes, upgrades and other extensions detailed in NEWS file extract below, in the ChangeLog file in the package and on the Rcpp Changelog page.

Changes in Rcpp version 0.11.1 (2014-03-13)

  • Changes in Rcpp API:

    • Preserve backwards compatibility with Rcpp 0.10.* by allowing RObject extraction from vectors (or lists) of Rcpp objects

    • Add missing default constructor to Reference class that was omitted in the header-only rewrite

    • Fixes for NA and NaN handling of the IndexHash class, as well as the vector .sort() method. These fixes ensure that sugar functions depending on IndexHash (i.e. unique(), sort_unique(), match()) will now properly handle NA and NaN values for numeric vectors.

    • DataFrame::nrows now more accurately mimics R's internal behavior (checks the row.names attribute)

    • Numerous changes to permit compilation on the Solaris OS

    • Rcpp vectors gain a subsetting method – it is now possible to subset an Rcpp vector using CharacterVectors (subset a by name), LogicalVectors (logical subsetting), and IntegerVectors (0-based index subsetting). Such subsetting will also work with Rcpp sugar expressions, enabling expressions such as x[ x > 0].

    • Comma initialization (e.g. CharacterVector x = "a", "b", "c";, has been disabled, as it causes problems with the behavior of the = operator with Rcpp::Lists. Users who want to re-enable this functionality can use #define RCPP_COMMA_INITIALIZATION, but be aware of the above caveat. The more verbose CharacterVector x = CharacterVector::create("a", "b", "c") is preferred.

  • Changes in Rcpp Attributes

    • Fix issue preventing packages with Rcpp::interfaces attribute from compiling.

    • Fix behavior with attributes parsing of ::create for default arguments, and also allow constructors of a given size (e.g. NumericVector v = NumericVector(10)) gives a default value of numeric(10) at the R level). Also make NAs preserve type when exported to R (e.g. NA_STRING as a default argument maps to NA_character_ at the R level)

  • Changes in Rcpp modules

    • Corrected the un_pointer implementation for object

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, 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.

/code/rcpp | permanent link

Sat, 08 Mar 2014

RcppArmadillo 0.4.100.2.1

Conrad made a first bug-fix release 4.100.2 for Armadillo, his templated C++ library for linear algebra, yesterday. See below for details on the the small set of changes.

This was quickly wrapped up in a new RcppArmadillo release 0.4.100.2.1 release. I also added some first steps towards turning C++11 on. This can be used now with a pre-release of R 3.1.0, and can be generally activated once R 3.1.0 is released on April 10.

Changes in RcppArmadillo version 0.4.100.2 (2014-03-07)

  • Upgraded to Armadillo release Version 4.100.2

    • fix for handling null vectors by normalise()

    • fix for memory handling by sparse matrices

  • Correct use of [[ depends()]] in skeleton example file

  • Prepare src/Makevars for C++11 support from R 3.1.0 by defining USE_CXX11 which is currently commented out

  • In the Armadillo configuration, turn on C++11 support if USE_CXX11 is defined

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Fri, 07 Mar 2014

RcppEigen 0.3.2.1.0 and 0.3.2.1.1

Shortly after I prepared the bug-fix / maintenance release 0.3.2.0.3 of RcppEigen, the code based was updated to the recent Eigen release 3.2.1 by Doug Bates. I wrapped this up in release 0.3.2.1.0 of RcppEigen.

The next day, Brian Ripley noticed a build failure on Solaris; and followed up with a better ifdef test for one problematic line which now also addresses the equally irrelevant Unix variants of HP, SGI, and AIX (IBM). May it help someone ... In any event, this constituted release 0.3.2.1.1.

The NEWS entries for both follow.

Changes in RcppEigen version 0.3.2.1.1 (2014-03-06)

  • Better ifdef on one directory entry feature, with thanks to Brian Ripley.

Changes in RcppEigen version 0.3.2.1.0 (2014-03-03)

  • Updated to version 3.2.0 of Eigen

Courtesy of CRANberries, there are diffstat reports for the most recent release and preceding release.

Questions, comments etc about RcppEigen 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.

/code/rcpp | permanent link

Sat, 01 Mar 2014

RcppEigen 0.3.2.0.2

A new bug-fix / maintenance release of RcppEigen is now on CRAN. RcppEigen brings the Eigen C++ template library for linear algebra to R.

This release updates the RcppEigen.package.skeleton() function for a needed change in R, updates and extends the code example used by this skeleton package generator, and updates a few things now that Rcpp 0.11.0 is out.

Changes in RcppEigen version 0.3.2.0.3 (2014-03-01)

  • Updated and extended RcppEigen.package.skeleton() to use several examples via Rcpp Attributes; also removed the deprecated namespace argument

  • Updated skeleton package example for Rcpp 0.11.0 or later by removing needed for linking with user library

  • Updated files DESCRIPTION, NAMESPACE, src/Makevars and src/Makevars.win similarly

Courtesy of CRANberries, there are diffstat reports for the most recent release relative to the preceding version.

Questions, comments etc about RcppEigen 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.

/code/rcpp | permanent link

RcppArmadillo 0.4.100.0

A new minor upstream release 4.100 of the Armadillo templated C++ library for linear algebra was finalised by Conrad yesterday. I rolled up the corresponding RcppArmadillo release 0.4.100.0 which is now on CRAN and will go to Debian shortly.

Changes in RcppArmadillo version 0.4.100.0 (2014-02-28)

  • Upgraded to Armadillo release Version 4.100.0 (Dirt Cruiser)

    • added normalise() for normalising vectors to unit p-norm

    • extended the field class to handle 3D layout

    • extended eigs_sym() and eigs_gen() to obtain eigenvalues of various forms (eg. largest or smallest magnitude)

    • automatic SIMD vectorisation of elementary expressions (eg. matrix addition) when using Clang 3.4+ with -O3 optimisation

    • faster handling of sparse submatrix views

    • workaround for a bug in LAPACK 3.4

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Sat, 22 Feb 2014

RcppBDT 0.2.2

A new maintenance release of the RcppBDT package is now on CRAN. There is no new code in this; it mainly accomodates a request by CRAN to standardize the \code{Imports:} and \code{Depends:} relationships in the \code{DESCRIPTION} file. We also updated the build process now that we can use Rcpp 0.11.0.

Having said that, there is a lot of new code in the git repository but I guess I'll talk about that when I can make a new upload. Yesterday, this balked because win-builder felt the need for a long long int in 64-bit mode which we can provide once C++11 will be permitted under R 3.1.0, due out in April. Oddly, no such need arose in 64-bit Linux. Oh well.

The complete NEWS entry is below:

Changes in version 0.2.2 (2014-02-21)

  • Updates to current CRAN Policy standards for Depends: and Imports: in DESCRIPTION

  • Also take advantage of new Rcpp 0.11.0 build options

  • New code remains in GitHub repo master branch until R 3.1.0 is release so that we can use C++11 in order to get the long long int support without which the package does not build on Windows (whereas Linux is fine)

Courtesy of CRANberries, there is also a diffstat report for 0.2.2 relative to 0.2.1. 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.

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

/code/rcpp | permanent link

Thu, 20 Feb 2014

RcppArmadillo 0.4.000.4

A new minor release of RcppArmadillo is now on CRAN and in Debian. RcppArmadillo brings the Armadillo templated C++ library for linear algebra to R by means of Rcpp.

This release contains both a few minor bugfixes from the 4.000 branch of Armadillo and some enhancements in RcppArmadillo itself that are related to the recent Rcpp 0.11.0 release.

Changes in RcppArmadillo version 0.4.000.4 (2014-02-19)

  • Upgraded to Armadillo release Version 4.000.4

    • fix for randi() generating out-of-interval values

    • fix for saving field objects

    • workaround for a bug in the Intel compiler

  • Updated for Rcpp (>= 0.11.0) by removing linking step from build process, added appropriate dependency on Rcpp

  • Updated RcppArmadillo.package.skeleton function accordingly to use proper NAMESPACE import

  • Rewritten rcpparma_hello_world (which is used by the RcppArmadillo.package.skeleton function) to use Rcpp Attributes, and added more examples

  • Added two functions to set Armadillo's RNGs (ie the system RNG) from a given value and to randomize it, as suggested by Gábor Csárdi. Note that these do not work within RStudio (which itself also uses the same system RNG).

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Mon, 10 Feb 2014

RcppSMC 0.1.2

Late last week, and just before leaving to participate in this crazy thing, I managed to get a new version of RcppSMC onto CRAN.

RcppSMC combines the SMCTC template classes for Sequential Monte Carlo and Particle Filters (Johansen, 2009, JSS) with the Rcpp package for R/C++ Integration (Eddelbuettel and Francois, 2011, JSS) and thereby allows for easier and more direct access from R to the computational core of the Sequential Monte Carlo algorithm.

This release regroups a few minor changes we accumulated over the last few months, but was triggered by the Rcpp 0.11.0 release last week.

The NEWS entry is below:

Changes in RcppSMC version 0.1.2 (2014-02-06)

  • Updated for Rcpp 0.11.0 with explicit importFrom in NAMESPACE and corresponding versioned Imports: in DESCRIPTION; also removed linking instruction from src/Makevars as no it is longer needed with this new Rcpp version

  • Addded GitHub / Travis CI support

  • Use more portable dev.new() rather than x11() in pfLinearBS.R

  • Applied some corrections to pfNonlinBS.R example

  • Converted NEWS to NEWS.Rd

Courtesy of CRANberries, there is also a diffstat report relative to the previous release. As always, more detailed information is on the RcppSMC 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.

/code/rcpp | permanent link

Mon, 03 Feb 2014

Rcpp 0.11.0

A new major release 0.11.0 of Rcpp is now on the CRAN network for GNU R and binaries for Debian have been uploaded as well.

Before you read on, please note that this release will most likely require a reinstallation of all your packages using Rcpp as it now works without a user-facing shared library.

The biggest change in this version is that it is now effectively headers-only. Before you wonder, there is still compiled code provided by Rcpp for use by packages. But this uses the function registration mechanism of GNU R instead via instantiation at package startup. This does make package building easier, will remove the need to query GNU R for the Rcpp library file in src/Makevars when compiling, and should generally avoid building issues such as the dreaded fails on paths with spaces still annoying users of a certain OS.

There are a number of other fixes, upgrades and other extensions detailed in NEWS file extract below, in the ChangeLog file in the package and on the Rcpp Changelog page as well as in a release announcement I'll post later.

Changes in Rcpp version 0.11.0 (2014-02-02)

  • Changes in Rcpp API:

    • Functions provided/used by Rcpp are now registered with R and instantiated by client package alleviating the need for explicit linking against libRcpp which is therefore no longer created.

    • Updated the Rcpp.package.skeleton() function accordingly.

    • New class StretchyList for pair lists with fast addition of elements at the front and back. This abstracts the 3 functions NewList, GrowList and Insert used in various packages and in parsers in R.

    • The function dnt, pnt, qnt sugar functions were incorrectly expanding to the no-degree-of-freedoms variant.

    • Unit tests for pnt were added.

    • The sugar table function did not handle NAs and NaNs properly for numeric vectors. Fixed and tests added.

    • The internal coercion mechanism mapping numerics to strings has been updated to better match R (specifically with Inf, -Inf, and NaN.)

    • Applied two bug fixes to Vector sort() and RObject definition spotted and corrected by Kevin Ushey

    • New checkUserInterrupt() function that provides a C++ friendly implementation of R_CheckUserInterrupt.

  • Changes in Rcpp attributes:

    • Embedded R code chunks in sourceCpp are now executed within the working directory of the C++ source file.

    • Embedded R code chunks in sourceCpp can now be disabled.

  • Changes in Rcpp documentation:

    • The Rcpp-FAQ and Rcpp-package vignettes have been updated and expanded.

    • Vignettes are now typeset with grey background for code boxes.

    • The bibtex reference file has been update to reflexct current package versions.

  • Changes in Rcpp unit tests:

    • The file tests/doRUnit.R was rewritten following the pattern deployed in RProtoBuf which is due to Murray Stokely

    • The function test() was rewritten; it provides an easy entry point to running unit tests of the installed package

Thanks to CRANberries, you can also look at a diff to the previous release 0.10.6. As always, even fuller details are on the 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

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

/code/rcpp | permanent link

Sun, 26 Jan 2014

RcppEigen 0.3.2.0.2

A new maintenance release of RcppEigen is now on CRAN. And just like yesterday's RcppClassic upload and today's RcppZiggurat upload, the timing was motivated chiefly by some minor caretaking for an upcoming Rcpp release -- hopefully soon, and with more details to follow.

But this release also contains some minor cleanups. The NEWS file entry shown below lists all changes.

Changes in RcppEigen version 0.3.2.0.2 (2014-01-26)

  • Converted three unused unit test files to RUnit and removed Suggests: of testthat

  • Add declaration to import a symbol from Rcpp to NAMESPACE to ensure proper instantiation with the upcoming Rcpp version

  • Retire SHLIB.maker function

Courtesy of CRANberries, there are diffstat reports for the most recent release relative to the preceding version.

Questions, comments etc about RcppEigen 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.

/code/rcpp | permanent link

RcppZiggurat 0.1.2

A new maintenance release of RcppZiggurat is now on CRAN. And just like yesterday's RcppClassic upload, this is motivated chiefly by some minor caretaking for an upcoming Rcpp release -- hopefully soon, and with more details to follow.

This release also contains some small extensions and work-in-progress. By using R's uniform generator, we can fall back to R's seeding of the RNG -- but going through the R data structures has a performance hit. Similarly, and somewhat surprisingly, the default generators in both Boost and the C++11 library are not all that speedy.

The NEWS file entry shown below lists all changes.

Changes in version 0.1.2 (2013-12-28)

  • Add a new generator deploying R's unif_rand which faciliates use of Ziggurat as the user-supplied generator for N(0,1)

  • Update a 'local' demo comparing normal distribution RNGs from Boost, C++11 and Armadillo none of which are particularly speedy

  • Add declaration to import a symbol from Rcpp to NAMESPACE to ensure proper instantiation with the upcoming Rcpp version

Courtesy of CRANberries, there are diffstat reports for the most recent release relative to the preceding version.

More detailed information is on the RcppZiggurat page. 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.

/code/rcpp | permanent link

Sat, 25 Jan 2014

RcppClassic 0.9.5

A maintenance release of RcppClassic, now at version 0.9.5, went out to CRAN today. Nothing changed in user-facing code. The build was triggered by a change in an upcoming Rcpp release (more about that another time), and a few minor updates were needed for extended checks done by R.

Courtesy of CRANberries, there is the set of changes relative to the previous release 0.9.4.

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.

/code/rcpp | permanent link

Wed, 22 Jan 2014

RcppArmadillo 0.4.000.2

A bug fix release of Armadillo came out and was turned into a new RcppArmadillo release which is now on CRAN and will go shortly to Debian.

The complete list of changes is below.

Changes in RcppArmadillo version 0.4.000.2 (2014-01-21)

  • Upgraded to Armadillo release Version 4.000.2

    • fix for randi() generating out-of-interval values

    • workaround for a bug in the Intel compiler

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Mon, 06 Jan 2014

RcppArmadillo 0.400

A new major release 4.000 of Armadillo came out out yesterday morning. This is a new stable release by Conrad with a new major number, and it brings a few nice changes as detailed below. I rolled up RcppArmadillo version 0.400 yesterday morning, and following a little bit of discussion this version is now on CRAN and in Debian.

The complete list of changes is below.

Changes in RcppArmadillo version 0.4.000 (2014-01-05)

  • Upgraded to Armadillo release Version 4.000 (Feral Steamroller)

    • added eigen decompositions of sparse matrices: eigs_sym() and eigs_gen() [ but this requires linking against ARPACK which RcppArmadillo as a pure-template package does not do, and R is not linked against ARPACK either. ]

    • added eigen decomposition for pair of matrices: eig_pair()

    • added simpler forms of eig_gen()

    • added condition number of matrices: cond()

    • expanded find() to handle cubes

    • expanded subcube views to access elements specified in a vector

    • template argument for running_stat_vec expanded to accept vector types

    • more robust fast inverse of 4x4 matrices

    • faster divide-and-conquer decompositions are now used by default for eig_sym(), pinv(), princomp(), rank(), svd(), svd_econ()

    • the form inv(sympd(X)) no longer assumes that X is positive definite; use inv_sympd() instead

    • added MEX connector for interfacing Octave/Matlab with Armadillo matrices (contributed by George Yammine)

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Mon, 23 Dec 2013

RcppZiggurat 0.1.0 (and 0.1.1): Faster N(0,1) RNGs

Over the last few weeks I have been working on getting the Ziggurat normal random number generator updated and available in R. The Ziggurat generator provides a pretty unique combination of speed and good statistical properties for (standard) normal random numbers (as opposed to uniform draws as is commonn for most RNGs).

Generation of N(0,1) draws may not by itself be the dominant slowdown in a simulation, yet when large number of draws are required it may be helpful to have a generator that is faster than the defaults in R (which have excellent properties, but not the fastest speed).

A first release 0.0.1 went to CRAN a couple of weeks ago. This was followed up by a more thorough release 0.1.0 this last weekend which, as it happens, needed a minor follow-up 0.1.1 to clean up some dependencies on the right R version, as well as vignette building procedures.

I added a web page about RcppZiggurat to group together some basic information, but the single best starting point may be the detailed pdf vignette included in the package.

Courtesy of CRANberries, there are diffstat reports for the most recent release as well as for the preceding release two days earlier.

More detailed information is on the RcppZiggurat page. 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.

/code/rcpp | permanent link

Thu, 19 Dec 2013

New RcppEigen release 0.3.2.0.1 -- and a new maintainer

In a recent email to the Rcpp and lme4 mailing lists, Doug Bates announced that was turning away from R, Rcpp, lme4 and hence also RcppEigen for which he had been both the primary author and maintainer.

This is huge loss for the R community. I have known Doug since the 1990s. He has been a fairly central figure around R during all those years in which I got more and more involved with R. I have learned a lot from him, and enjoyed the work together---initially on the Debian R package (which I took over from him), and all the way to joint work on Rcpp and RcppEigen, including our JSS paper. I am certain to miss him around R.

Now, in order to keep RcppEigen viable within CRAN and the R ecosystem, I have offered to maintain it. A first new upload is now on CRAN (and I also uploaded it to Debian where I started to maintain it too as a depedency for lme4). I have also started to make a few minor changes such as tightening Suggests: a little, and editing a few descriptive files. Details are in the Github repo.

Questions, comments etc about RcppEigen 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.

/code/rcpp | permanent link

Sat, 14 Dec 2013

RcppDE 0.1.2

A maintenance release (now at version 0.1.2) of my RcppDE package (previously described in these two posts) is now CRAN. More details about the package are available in the vignette also included in the RcppDE R package.

Changes were minimal and driven mostly by some CRAN Policy changes which now prefer vignette sources files in (top-level) directory vignettes/

Courtesy of CRANberries, there is also a diffstat report for the most recent release. Current and previous releases are available here as well as on CRAN.

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

/code/rcpp | permanent link

Tue, 10 Dec 2013

RcppArmadillo 0.3.930.1

A new Armadillo release 3.930 came out a few days ago, with a very nice set of changes (see below). I rolled this into RcppArmadillo 0.3.930.0. However, one of these changes revealed that R shipped only the standard SVD for complex-valued matrices, and not the more performant divide-and-conquer approach. So in R builds using the default built-in Lapack, at least one CRAN package no longer built.

After some back and forth, Conrad put some branching in the library to fall back to the standard SVD, and I added a built-time configuration test for an appropriate preprocessor directive used by the fallback code. This is now on which is now on CRAN and in Debian as RcppArmadillorelease 0.3.930.1, and Conrad will probably update the Armadillo page as well (though the fix is only needed with R's builtin Rlapack). Also of note is that R Core already added the missing Fortran routine zgesdd to R 3.1.0 (aka "R-devel") so this issue goes away with the next release. Also of note, I wrote up a short Rcpp Gallery post illustrating the performance gains available from divide-and-conquer SVD.

The complete list of changes is below.

Changes in RcppArmadillo version 0.3.930.1 (2013-12-09)

  • Upgraded to Armadillo release Version 3.930.1

    • Armadillo falls back to standard complex svd if the more performant divide-and-conquer variant is unavailable

  • Added detection for Lapack library and distinguish between R's own version (withhout zgesdd) and system Lapack; a preprocessor define is set accordingly

Changes in RcppArmadillo version 0.3.930.0 (2013-12-06)

  • Upgraded to Armadillo release Version 3.930 ("Dragon's Back")

    • added divide-and-conquer variant of svd_econ(), for faster SVD

    • added divide-and-conquer variant of pinv(), for faster pseudo-inverse

    • added element-wise variants of min() and max()

    • added size() based specifications of submatrix view sizes

    • added randi() for generating matrices with random integer values

    • added more intuitive specification of sort direction in sort() and sort_index()

    • added more intuitive specification of method in det(), .i(), inv() and solve()

    • added more precise timer for the wall_clock class when using C++11

  • New unit tests for complex matrices and vectors

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Sat, 07 Dec 2013

R and Big Data at Big Data Summit at UI Research Park

I spent yesterday at the very enjoyable Big Data Summit held at the University of Illinois Research Park at the edge of the University of Illinois at Urbana-Champaign. campus.

My (short) presentation was part of a panel session on R and Big Data which Doug Simpson of the UIUC Statistics department had put together very well. We heard from a vendor / technology provider with Christopher Nguyen from Adatao talking about their "Big R", from industry with Andy Stevens talking about a number of some real-life challenges with big data at John Deere, from academia with Jonathon Greenberg talking about R and HPC for geospatial research and I added a few short comments and links about R, HPC and Rcpp. My few slides are now up on my talks / presentations page.

Overall, a good day with a number of interesting presentations and of course a number of engaging hallway discussions.

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

/code/rcpp | permanent link

Sun, 01 Dec 2013

Recent Rcpp talks at U Chicago / Booth and U Kansas

In early October, I had an opportunity to talk about Rcpp and RcppArmadillo at the Statistical Computing Seminar at the Booth School of Business at the University of Chicago.

And then two weeks ago, I had an invitation to talk at the Center for Research Methods and Data Analysis at the University of Kansas where I covered similar material as well as ongoing work on the RcppZiggurat package (for which I should have an updated version soon).

Slides from both talks are now at the top of my talks / presentations 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.

/code/rcpp | permanent link

Sat, 30 Nov 2013

RcppCNPy 0.2.2

Right on the heels of release 0.2.1 of RcppCNPy, a new version 0.2.2 is now on CRAN. RcppCNPy uses the CNPY library by Carl Rogers to provide R with easy read and write access to NumPy files.

The reason for the new version that I had experimented with a different way to test endianness (as needed for the NumPy file headers) but accidentally sent an interim tarball to CRAN which still wanted to include endian.h promptly breaking Windows builds. So now we do something even simpler and just rely on the (even more complete) test for endianness when R is built, which prevents all sorts of complications for us and builds everywhere (with thanks to Brian Ripley for the suggestion). While we were at it, we also added a new unit test.

Full changes are listed below.

Changes in version 0.2.2 (2013-11-29)

  • Switched to using the result from the compile-time configuration for R to determine big or little endian (as needed for the NPy headers)

  • Added a new test (and test validation result file) for a complete save-reload cycle and comparison

CRANberries also provides a diffstat report for 0.2.2 relative to 0.2.1. 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.

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

/code/rcpp | permanent link

Thu, 28 Nov 2013

RcppCNPy 0.2.1

Version 0.2.1 of RcppCNPy is now on CRAN earlier. This version is a minor upgrade with a few small changes as detailed in the NEWS file:

Changes in version 0.2.1 (2013-11-28)

  • Synchronized code with the cnpy repository

  • Added new function to test from R whether integers supported

  • Updated tests for integer support, if available

  • Updated vignette and discussion about need for rebuilding only RcppCNPy with the -std=c++11 flag if integer support is desired

  • Updated tests for integer support, if available

  • Updated THANKS file

  • Ensure that inclusion of Rinternal.h does not affect other headers by adding RF_NO_REMAP

CRANberries also provides a diffstat report for 0.2.1 relative to 0.2.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.

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

/code/rcpp | permanent link

Wed, 20 Nov 2013

RcppArmadillo 0.3.920.3

Conrad released a bug fix version 3.920.3 for his Armadillo library. So I prepared a new release 0.3.920.3 of RcppArmadillo which is nor on on CRAN and also already in Debian. Note that we skipped interim version .2 which addressed an Atlas linking issue which doesn't affect us in the R context as we get LAPACK and BLAS via the R process we get used from.

The complete list of changes is below.

Changes in RcppArmadillo version 0.3.920.3 (2013-11-20)

  • Upgraded to Armadillo release Version 3.920.3

    • fix for handling of tiny matrices by .swap()

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. 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.

/code/rcpp | permanent link

Tue, 29 Oct 2013

Rcpp 0.10.6

A new maintenance release 0.10.6 of Rcpp is now on the CRAN network for GNU R; binaries for Debian have been uploaded as well.

This version ties up a number of smaller loose ends, but also adds a few new things, particularly John's new exposeClass. Details are as usual in the NEWS extract below, and also in the ChangeLog file in the package and on the Rcpp Changelog page.

Changes in Rcpp version 0.10.6 (2013-10-27)

  • Changes in Rcpp API:

    • The function exposeClass takes a description of the constructors, fields and methods to be exposed from a C++ class, and writes C++ and R files in the package. Inherited classes can be dealt with, but require data type information. This approach avoids hand-coding module files.

    • Two missing is<>() templates for CharacterVector and CharacterMatrix have been added, and some tests for is_na() and is_finite() have been corrected thanks to Thomas Tse.

  • Changes in R code:

    • Export linking helper function LdFlags as well as RcppLdFlags.

    • Function Rcpp.package.skeleton() no longer passes a namespace argument on to package.skeleton()

  • Changes in R setup:

    • Raise requirement for R itself to be version 3.0.0 or later as needed by the vignette processing

  • Changes in Rcpp attributes:

    • sourceCpp now correctly binds to Rtools 3.0 and 3.1

Thanks to CRANberries, you can also look at a diff to the previous release 0.10.5. As always, even fuller details are on the 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

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

/code/rcpp | permanent link

Mon, 30 Sep 2013

RcppArmadillo 0.3.920.1

Along with the Rcpp 0.10.5 release yesterday, a new minor release 0.3.920.1 of RcppArmadillo came out. It is based on Conrad's Armadillo 3.920.0 plus a minor fix, and uses some of the new Rcpp features. Both package is now on CRAN and also in Debian.

This releases contains both a nice set of new Armadillo features as well as some nice additions to RcppArmadillo, due again mostly to Romain. Some of the changes tie into the changes changes in Rcpp 0.10.5 as for example the ability to pass const and const ref more efficiently (and we seem to have forgotten an entry in the NEWS file).

The complete list of changes is below.

Changes in RcppArmadillo version 0.3.920.1 (2013-09-27)

  • Upgraded to Armadillo release Version 3.920.1 (Agencia Nacional Stasi)

    • faster .zeros()

    • faster round(), exp2() and log2() when using C++11

    • added signum function: sign()

    • added move constructors when using C++11

    • added 2D fast Fourier transform: fft2()

    • added .tube() for easier extraction of vectors and subcubes from cubes

    • added specification of a fill type during construction of Mat, Col, Row and Cube classes, eg. mat X(4, 5, fill::zeros)

  • Initial implementation of wrap<subview>

  • Improved implementation of as<>() and wrap() for sparse matrices

  • Converted main vignette from LaTeX style minted to lstlisting which permits builds on CRAN; removed set BuildVignettes: FALSE.

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sun, 29 Sep 2013

Rcpp 0.10.5

A new version of Rcpp is now on the CRAN network for GNU R; binaries for Debian have been uploaded as well.

Once more, this release brings a large number of exciting changes to Rcpp. Some concern usability, some bring new features, some increase performance; see below for the detailed list. We have now released three updates on a quarterly cycle; if we keep this up the next version ought to be ready at the end of December.

As in the past, we tested the release rather rigorously by checking against all packages I could (relatively easily) built on my server: this time it successfully passed \code{R CMD check} for all 107 packages I can build locally out of a total of 136 packages. (Two failed: one for an error in \code{Makevars}, and one for the need of an X11 server during tests; this may get addressed in the in test script next time). As all of these 107 packages passed, we do not expect any issues with dependent packages. Should there be issues we would appreciate a note, preferably with reproducible code, to the rcpp-devel mailing list.

The complete NEWS entry for 0.10.4 is below; more details are in the ChangeLog file in the package and on the Rcpp Changelog page.

Changes in Rcpp version 0.10.5 (2013-09-28)

  • Changes in R code:

    • New R function demangle that calls the DEMANGLE macro.

    • New R function sizeof to query the byte size of a type. This returns an object of S3 class bytes that has a print method showing bytes and bits.

  • Changes in Rcpp API:

    • Add defined(__sun) to lists of operating systems to test for when checking for lack of backtrace() needed for stack traces.

    • as<T*>, as<const T*>, as<T&> and as<const T&> are now supported, when T is a class exposed by modules, i.e. with RCPP_EXPOSED_CLASS

    • DoubleVector as been added as an alias to NumericVector

    • New template function is<T> to identify if an R object can be seen as a T. For example is<DataFrame>(x). This is a building block for more expressive dispatch in various places (modules and attributes functions).

    • wrap can now handle more types, i.e. types that iterate over std::pair<const KEY, VALUE> where KEY can be converted to a String and VALUE is either a primitive type (int, double) or a type that wraps. Examples :

      • std::map<int, double> : we can make a String from an int, and double is primitive

      • boost::unordered_map<double, std::vector<double> >: we can make a String from a double and std::vector<double> can wrap itself

      Other examples of this are included at the end of the wrap unit test file (runit.wrap.R and wrap.cpp).

    • wrap now handles containers of classes handled by modules. e.g. if you expose a class Foo via modules, then you can wrap vector<Foo>, ... An example is included in the wrap unit test file.

    • RcppLdFlags(), often used in Makevars files of packages using Rcpp, is now exported from the package namespace.

  • Changes in Attributes:

    • Objects exported by a module (i.e. by a RCPP_MODULE call in a file that is processed by sourceCpp) are now directly available in the environment. We used to make the module object available, which was less useful.

    • A plugin for openmp has been added to support use of OpenMP.

    • Rcpp::export now takes advantage of the more flexible as<>, handling constness and referenceness of the input types. For users, it means that for the parameters of function exported by modules, we can now use references, pointers and const versions of them. The file Module.cpp file has an example.

    • No longer call non-exported functions from the tools package

    • No longer search the inline package as a fallback when loading plugins for the the Rcpp::plugins attribute.

  • Changes in Modules:

    • We can now expose functions and methods that take T& or const T& as arguments. In these situations objects are no longer copied as they used to be.

  • Changes in sugar:

    • is_na supports classes DatetimeVector and DateVector

  • Changes in Rcpp documentation:

    • The vignettes have been moved from inst/doc/ to the vignettes directory which is now preferred.

    • The appearance of the vignettes has been refreshed by switching to the Bistream Charter font, and microtype package.

  • Deprecation of RCPP_FUNCTION_*:

    • The macros from the preprocessor_generated.h file have been deprecated. They are still available, but they print a message in addition to their expected behavior.

    • The macros will be permanently removed in the first Rcpp release after July 2014.

    • Users of these macros should start replacing them with more up-to-date code, such as using 'Rcpp attributes' or 'Rcpp modules'.

Thanks to CRANberries, you can also look at a diff to the previous release 0.10.4. As always, even fuller details are on the 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

/code/rcpp | permanent link

Mon, 19 Aug 2013

Slides from Rcpp talk in Chicago

A couple of days ago, I gave a talk to the Chicago R Users Group which is run ever-so-smoothly by Paul Teetor and Chase Carpenter.

The talk provided a brief introduction to Rcpp for R and C++ integration. Slides are now up on my talks / presentations page.

/code/rcpp | permanent link

Thu, 15 Aug 2013

RcppArmadillo 0.3.910.0

A new minor release 3.910.0 of Armadillo came out a few days ago. A new RcppArmadillo release 0.3.910.0 was provided rightaway, and after a brief back-and-forth with CRAN (mostly having to do with the non-standard vignette corresponding to our CSDA paper and its use of LaTeX minted) is now on CRAN and also in Debian.

Conrad made some standard cross-products faster, and added vectorise(), any() and all() functions. We also added an extension header for more automated conversion of sparse matrices (which is already used by a post on the Rcpp Gallery).

The complete list of changes is below.

Changes in RcppArmadillo version 0.3.910.0 (2013-08-12)

  • Upgraded to Armadillo release Version 3.910.0 (Pyrenees)

    • faster multiplication of a matrix with a transpose of itself, ie. X*X.t() and X.t()*X

    • added vectorise() for reshaping matrices into vectors

    • added all() and any() for indicating presence of elements satisfying a relational condition

  • Added conversion support for sparse matrices (of type double) created by the Matrix package as class dgCMatrix

  • Moved vignette sources from inst/doc to vignettes; set BuildVignettes: FALSE as the minted mode for LaTeX upsets the CRAN builders.

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sun, 04 Aug 2013

RcppArmadillo 0.3.900.7

A bug-fix release 3.900.7 of Armadillo was provided by Conrad a few days ago. It has been rolled into a new RcppArmadillo release 0.3.900.7 which, after a brief delay, is now on CRAN and in Debian.

The main bug fix is a change in the in-place version of reshape(). This in turn caused the CRAN package Amelia to fail, but some diligent debugging by Conrad (which was much appreciated) revealed that the error was in fact in RcppArmadillo where we did not set the matrix flag properly in the constructor. The corresponding one-character fix had been made in this release.

Another package exhibiting an issue is unmarked. It needs to make the target variable of reshape a matrix object in a handful of places. I sent the authors a small patch addressing this but have not yet heard back.

The complete list of changes is below. In the meantime, I have also done some work on a new as() and wrap() converters for sparse matrices; a first implementation is in SVN.

Changes in RcppArmadillo version 0.3.900.7 (2013-08-02)

  • Upgraded to Armadillo release Version 3.900.7 (Bavarian Sunflower)

    • minor fix for inplace reshape()

    • minor corrections for compilation issues under GCC 4.8+ and MSVC

  • Corrected setting of vec_stats in intialization of row, vector and matrix objects

  • The inline package is no longer used in the examples and unit tests which have all been converted to using Rcpp attributes

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sat, 13 Jul 2013

Slides from Rcpp talk in Sydney

The Sydney Users of R Forum (SURF) were kind enough to host me two days (well, three with the traveling ...) ago for an hour-long talk on Rcpp. Apparently, it set a new attendance record for this R user group. My thanks to Louise and Eugene for hosting a terrific meeting, and taking me out for a bite and drink afterwards. I have now put up my slides on my talks / presentations page for anyone else to peruse.

/code/rcpp | permanent link

Mon, 24 Jun 2013

Rcpp 0.10.4

A new version of Rcpp is now on the CRAN network for GNU R; binaries for Debian have been uploaded as well.

This release brings a fairly large number of fixes and improvements across a number of Rcpp features, see below for the detailed list.

We are also announcing with this release that we plan to phase out the RCPP_FUNCTION_* macros. Not only have they been superceded by Rcpp Modules and Rcpp Atributes (each of which has its own pdf vignette in the Rcpp package), but they also appear to be at best lightly used. We are for example not aware of any CRAN packages deploying them. To provide a smooth transition, we are aiming to keep them around for another twelve months, but plan to remove them with the first release after that time window has passed.

As before, we tested the release rather rigorously by checking against all packages I could (relatively easily) built on my server: this time it covered 91 of the 124 CRAN packages depending on Rcpp. As all of these 91 packages passed their checks, we do not expect any issues with dependent packages.

The complete NEWS entry for 0.10.4 is below; more details are in the ChangeLog file in the package and on the Rcpp Changelog page.

Changes in Rcpp version 0.10.4 (2013-06-23)

  • Changes in R code: None beyond those detailed for Rcpp Attributes

  • Changes in Rcpp attributes:

    • Fixed problem whereby the interaction between the gc and the RNGScope destructor could cause a crash.

    • Don't include package header file in generated C++ interface header files.

    • Lookup plugins in inline package if they aren't found within the Rcpp package.

    • Disallow compilation for files that don't have extensions supported by R CMD SHLIB

  • Changes in Rcpp API:

    • The DataFrame::create set of functions has been reworked to just use List::create and feed to the DataFrame constructor

    • The operator-() semantics for Date and Datetime are now more inline with standard C++ behaviour; with thanks to Robin Girard for the report.

    • RNGScope counter now uses unsigned long rather than int.

    • Vector<*>::erase(iterator, iterator) was fixed. Now it does not remove the element pointed by last (similar to what is done on stl types and what was intended initially). Reported on Rcpp-devel by Toni Giorgino.

    • Added equality operator between elements of CharacterVectors.

  • Changes in Rcpp sugar:

  • Changes in Rcpp build tools:

    • Fix by Martyn Plummer for Solaris in handling of SingleLogicalResult.

    • The src/Makevars file can now optionally override the path for /usr/bin/install_name_tool which is used on OS X.

    • Vignettes are trying harder not to be built in parallel.

  • Changes in Rcpp documentation:

    • Updated the bibliography in Rcpp.bib (which is also sourced by packages using Rcpp).

    • Updated the THANKS file.

  • Planned Deprecation of RCPP_FUNCTION_*:

    • The set of macros RCPP_FUNCTION_ etc ... from the preprocessor_generated.h file will be deprecated in the next version of Rcpp, i.e they will still be available but will generate some warning in addition to their expected behavior.

    • In the first release that is at least 12 months after this announcement, the macros will be removed from Rcpp.

    • Users of these macros (if there are any) should start replacing them with more up to date code, such as using Rcpp attributes or Rcpp modules.

Thanks to CRANberries, you can also look at a diff to the previous release 0.10.3. As always, even fuller details are on the 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

/code/rcpp | permanent link

Thu, 20 Jun 2013

Upcoming Rcpp talk in Sydney

The Sydney Users of R Forum (SURF) will be hosting me for a talk on July 10. The focus will be Rcpp for R and C++ integration, and the intent is to have this be really applied with lots of motivating examples.

Organizers Louise and Eugene were able to move this to a slightly larger room as the initial capacity of 50 was filled almost immediately. As of right now, the talk page shows a few available slots. If you're in the Sydney are in early July, why not register and swing by?

If you're not in the area, the Rcpp Events page lists other upcoming talks too.

/code/rcpp | permanent link

Fri, 07 Jun 2013

The Rcpp Book is now shipping

My book about Rcpp (and its R and C++ integration) is now available from Springer.

Amazon still lists it as not-yet-released; I expect this to change in the next few days.

/code/rcpp | permanent link

Wed, 05 Jun 2013

RcppArmadillo 0.3.900.0

A Armadillo release 3.900.0 was provided by Conrad yesterday. It has been rolled into a new RcppArmadillo release 0.3.900.0 which is now on CRAN and in Debian.

It has a number of nice changes, mostly on the performance side of things (see below) and a minor cleanup/improvement in our Kalman filter example (which, as I just realized, I forgot to note in the \code{NEWS.Rd} in the released tarball):

Changes in RcppArmadillo version 0.3.900 (2013-06-04)

  • Upgraded to Armadillo release Version 3.900.0 (Bavarian Sunflower)

    • added automatic SSE2 vectorisation of elementary expressions (eg. matrix addition) when using GCC 4.7+ with -O3 optimisation

    • added support for saving & loading of cubes in HDF5 format, contributed by Szabolcs Horvat

    • faster median(), contributed by Ruslan Shestopalyuk

    • faster handling of compound expressions with transposes of submatrix rows

    • faster handling of compound expressions with transposes of complex vectors

  • Kalman filter example switched from inline to \code{sourceCpp}, which simplifies / streamlines the C++ side a little

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Mon, 13 May 2013

RcppArmadillo 0.3.820

Conrad rolled up a new Armadillo release 3.820 (following two minor fix release in the 0.3.810 series of which we packaged the one that was relevant for us). This new version is now out in a release 0.3.820 of RcppArmadillo which is already on CRAN and in Debian.

The summary of the main changes follows:

Changes in RcppArmadillo version 0.3.820 (2013-05-12)

  • Upgraded to Armadillo release Version 3.820 (Mt Cootha)

    • faster as_scalar() for compound expressions

    • faster transpose of small vectors

    • faster matrix-vector product for small vectors

    • faster multiplication of small fixed size matrices

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sun, 12 May 2013

Recent Rcpp talks at U of C and MCW

A couple of days ago, I had an opportunity to give a guest lecture on our Rcpp package for R and C++ integration. This was in CMSC 12300 Computer Science with Applications-3 in the Department of Computer Science at University of Chicago. The course is the final part of a three term sequence introducing students to data-centric work in R, Python, Java and C++. I tried to keep it brief and engaging in order to motivate the why or R/C++ integration while providing plenry of useful examples.

And yesterday I got to spend a day giving an invited day-long workshop at the Medical College of Wisconsin as part of a two-day R workshop sponsored by the Milwaukee Chapter of the American Statistical Assocation as well as the CTSI and PCOR centers at the Medical College of Wisconsin. In the workshop, I followed the previously-used setup of four parts on introduction, Rcpp details, advanced topics and last-but-not-least applications, but also updated and extended to more recent topics.

Pdf slides from both events are now on my presentations page.

/code/rcpp | permanent link

Sat, 20 Apr 2013

RcppArmadillo 0.3.810.0

A new Armadillo release 3.810.0 by Conrad appeared yesterday, and was wrapped up in a new release 0.3.810.0 of RcppArmadillo. Upstream changes bring FFT support as well as more Sparse matrix constructors, and we have an improvement to the sample() function contributed by Christian Gunning.

As RcppArmadillo is used by an increasing number of packages---on CRAN alone, we find 34 direct dependencies---I also added the package to Debian and upload there in parallel.

The summary of the main changes follows:

Changes in RcppArmadillo version 0.3.810.0 (2013-04-19)

  • Upgraded to Armadillo release Version 3.810.0 (Newell Highway)

    • added fast Fourier transform: fft()

    • added handling of .imbue() and .transform() by submatrices and subcubes

    • added batch insertion constructors for sparse matrices

    • minor fix for multiplication of complex sparse matrices

  • Updated sample() function and test again contributed by Christian Gunning

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sat, 23 Mar 2013

Rcpp 0.10.3

A new relase 0.10.3 of Rcpp is now on CRAN and in Debian.

This is the fourth release in the 0.10.* series, and further extends and solidifies the excellent Rcpp attributes. A few other bugs were fixed as well, and support for wide character strings has been added.

We once again tested this fairly rigorously by checking against 86 of the 100 CRAN packages depending on Rcpp. All of these passed. So we do not expect any issues with dependent packages, but one never knows.

The complete NEWS entry for 0.10.3 is below; more details are in the ChangeLog file in the package and on the Rcpp Changelog page.

Changes in Rcpp version 0.10.3 (2013-03-23)

  • Changes in R code:

    • Prevent build failures on Windowsn when Rcpp is installed in a library path with spaces (transform paths in the same manner that R does before passing them to the build system).

  • Changes in Rcpp attributes:

    • Rcpp modules can now be used with sourceCpp

    • Standalone roxygen chunks (e.g. to document a class) are now transposed into RcppExports.R

    • Added Rcpp::plugins attribute for binding directly to inline plugins. Plugins can be registered using the new registerPlugin function.

    • Added built-in cpp11 plugin for specifying the use of C++11 in a translation unit

    • Merge existing values of build related environment variables for sourceCpp

    • Add global package include file to RcppExports.cpp if it exists

    • Stop with an error if the file name passed to sourceCpp has spaces in it

    • Return invisibly from void functions

    • Ensure that line comments invalidate block comments when parsing for attributes

    • Eliminated spurious empty hello world function definition in Rcpp.package.skeleton

  • Changes in Rcpp API:

    • The very central use of R API R_PreserveObject and R_ReleaseObject has been replaced by a new system based on the functions Rcpp_PreserveObject, Rcpp_ReleaseObject and Rcpp_ReplaceObject which shows better performance and is implemented using a generic vector treated as a stack instead of a pairlist in the R implementation. However, as this preserve / release code is still a little rough at the edges, a new #define is used (in config.h) to disable it for now.

    • Platform-dependent code in Timer.cpp now recognises a few more BSD variants thanks to contributed defined() test suggestions

    • Support for wide character strings has been added throughout the API. In particular String, CharacterVector, wrap and as are aware of wide character strings

Thanks to CRANberries, you can also look at a diff to the previous release 0.10.2. As always, even fuller details are on the 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

/code/rcpp | permanent link

Tue, 12 Mar 2013

Rcpp master class in New York last weekend

On Saturday I had the opportunity to teach another one-day master class on Rcpp. The class had been organized by Jared Lander, and organized very well I might add.

The weekend started with a slight disappointment. I had taken Friday off, and hoped to reach NY by early afternoon to join JJ there, and to spend the afternoon with the RStan team. However, the tail end of last week's snowstorm made it such that we both got to Columbia's stats department closer to 6pm rather than 1pm, and half the team had left. Dang. Very frustrating travel experience. We salvaged the evening by gabbing over a cold beverage or two, before sharing some sacred New York pizza with Wes McKinney and Jared.

The class itself on Saturday went quite well. With JJ on deck, we were able to have every participant log into an EC2-hosted instance of RStudio Server, which worked very well for usage examples of Rcpp. It has been almost a year since I last taught the class, and many exciting things--such as Rcpp attributes, added by JJ himself--have appeared, which made it extra fun. Participants were rather kind with praise. Either they really liked it, or they really are hard-nosed New Yorkers who manage to lie to my face without me noticing.

We ended the day with some hard-earned cold beverages, followed by some dinner at Sylvia's (as tweeted by Jared) followed by more drinks. Ended up a little past my usual bedtime, but I managed to get out and enjoy a lovely 6.5 miles run across Central Park the next morning before leaving town.

All in all, a very nice weekend, the travel horror of Friday notwithstanding. And who know, maybe we'll just do it again another time...

/code/rcpp | permanent link

RcppArmadillo 0.3.800.1

Conrad released a first bug-fix release 3.800.1 of Armadillo earlier today. This has been wrapped up in release 0.3.800.1 of RcppArmadillo as usual. This release also contains a very nice function sample() (contributed by Christian Gunning) which provides sampling (with or without replacement) at the C++ level modeled after what we are used to in R itself. We also refactored the unit tests into just two compilation units to speed testing up a little.

The summary of the main changes follows:

Changes in RcppArmadillo version 0.3.800.1 (2013-03-12)

  • Upgraded to Armadillo release Version 3.800.1 (Miami Beach)

    • workaround for a bug in ATLAS 3.8 on 64 bit systems

    • faster matrix-vector multiply for small matrices

  • Added new sample() function and tests contributed by Christian Gunning

  • Refactored unit testing code for faster unit test performance

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sat, 02 Mar 2013

RcppArmadillo 0.3.800.0

A new Armadillo version 3.800.0 is now out. Conrad picked a new numbering scheme to coincide with the relicensing from LGPL to MPL 2.0. The new version 0.3.800.0 of the corresponding RcppArmadillo package (which still uses GPL 2 or later) is now on CRAN. It also contains the updated version of our paper as the package vignette.

The summary of the main changes follows:

Changes in RcppArmadillo version 0.3.800.0 (2013-03-01)

  • Upgraded to Armadillo release Version 3.800.0 (Miami Beach)

    • Armadillo is now licensed using the Mozilla Public License 2.0

    • added .imbue() for filling a matrix/cube with values provided by a functor or lambda expression

    • added .swap() for swapping contents with another matrix

    • added .transform() for transforming a matrix/cube using a functor or lambda expression

    • added round() for rounding matrix elements towards nearest integer

    • faster find()

    • fixes for handling non-square matrices by qr() and qr_econ()

    • minor fixes for handling empty matrices

    • reduction of pedantic compiler warnings

  • Updated vignette to paper now in press at CSDA

  • Added CITATION file with reference to CSDA paper

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Sat, 23 Feb 2013

Two papers about RcppEigen and RcppArmadillo published

Two papers got published recently. The first one is Bates and Eddelbuettel (2013). It is titled Fast and Elegant Numerical Linear Algebra Using the RcppEigen Package, and provides a pretty thorough introduction to our RcppEigen package which uses Rcpp to provide access to the Eigen C++ template library from GNU R. The paper is out as Volume 50, Issue 5 at the (all electronic, open, and generally awesome) Journal of Statistical Software. A bibtex entry is available.

The second paper is Eddelbuettel and Sanderson (2013). This one is titled RcppArmadillo: Accelerating R with high-performance C++ linear algebra and introduces the RcppArmadillo package which brings Conrad Sanderson's Armadillo C++ template library to GNU R by deploying Rcpp. The paper is currently "in press" at Computational Statistics & Data Analysis but the DOI 10.1016/j.csda.2013.02.005 will remain once a volume and issue is assigned by CSDA.

Preprints of both papers are available via my papers page, and as vignettes in the corresponding packages.

The upcoming Rcpp class in New York will feature Rcpp, RcppArmadillo and RcppEigen. Space is still available.

/code/rcpp | permanent link

Wed, 20 Feb 2013

RcppArmadillo 0.3.6.3

A new Armadillo version 3.6.3 came out this morning, and the corresponding RcppArmadillo version is now on CRAN. Changes are incremental:

Changes in RcppArmadillo version 0.3.6.3 (2013-02-20)

  • Upgraded to Armadillo release Version 3.6.3

    • faster find()

    • minor fix for non-contiguous submatrix views to handle empty vectors of indices

    • reduction of pedantic compiler warnings

Courtesy of CRANberries, there is also a diffstat report for the most recent release As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rcpp | permanent link

Mon, 18 Feb 2013

New Rcpp master class scheduled for New York

A new Rcpp master class is scheduled for March 9 in New York. The format will an updated version of the one-day workshops I have given at the University of Rochester in 2010, in San Franciso in 2011 (organised by Revolution Analytics) and at the UseR! conference in 2012.

The style will be hands-on, with numerous concrete examples and solid coverage of most aspects of Rcpp and related packages. As before, about six hours of instruction, split into four sessions of around ninety minutes focussing (loosely) on motivation/intro, core parts, extensions and applications. This should leave ample time for informal discussions and Q+A---as well as for lunch and coffee breaks---for a total of eight hours in the classroom.

This is being put together in New York with the help of Jared Lander, and we will have some technical assistance from RStudio in order to use their EC2 farm for exercises with Rcpp.

Registrations details are available here; information about other Rcpp events is also available.

Feel free to contact me or Jared at our usual email addresses with questions.

/code/rcpp | permanent link

Tue, 05 Feb 2013

A book about Rcpp

Some little birds had already been whispering about it, but I didn't want to jinx it and told myself I would wait with an announcement until the booksellers have (at least) placeholder pages. And as I learned from Duncan Murdoch via email earlier today, at least Chapters/Indigo had a page up, presumably scraped from the publisher page, so here it goes:
I have in fact handed a complete draft of my book about Seamless R and C++ Integration with Rcpp to Springer a few weeks ago. With a bit of luck on the production side, we could be seeing physical copies by May of a new title in their popular UseR! Series series.

And to the slowly growing new Rcpp site, I have added a a formal page about the Rcpp book where one can find information about it, including a link to the Springer page, links to a few bookseller's pages --- as well as a few wonderfully flattering endorsements. Eventually, errata and other support material should be available via this page too. Can't wait til I hold a physical copy in hand...

/code/rcpp | permanent link

New Rcpp page on upcoming events -- including Master Class in New York

Lots of exciting things are happening with and around Rcpp. I just added a new page about Upcoming Events to the recently-created Rcpp site. This events page has lots to cover: an upcoming talk at Columbia on March 8 (details still TBD), a day-long workshop in New York on March 9, a possible participation at a CERN / ROOT conference in Switzerland on May 11-14, an upcoming talk in May in Milwaukee, and last but not least the tutorial by Romain and Hadley at UseR! 2013 in Spain. Phew!

With that, a few quick words about the upcoming master class in New York. It will be a full day, covering an introduction and motivation, details about the core data types, tools for working with and and extending Rcpp and of course applications galore, including RcppArmadillo and RInside. I have done the same one day class format a few times before, most recently (with Revolution Analytics) in San Francisco in late 2011, and also as a two-part seminar at UseR! 2012. This time, we plan on providing cloud-hosted RStudio instances for participants. Better still, RStudio's own JJ Allaire will be on deck as well for RStudio --- and Rcpp Attributes --- questions.

Details and registration information for the New York class are at this page.

/code/rcpp | permanent link

Sun, 03 Feb 2013

The Rcpp Gallery and my Seinfeld Streak

A good three weeks ago, we introduced the Rcpp Gallery. While this is a joint effort by several of us on the Rcpp team, the backend was conceived and implemented entirely by JJ who also bootstrapped it with same first content, drawing on posts by Hadley, Romain and myself. As the How to contribute page makes plain, this is all backed by GitHub and all logs are public anyway.

So after it was up and working, JJ and I refined the look and feel, and I started to add more content so that would have something by the time the initial announcement came around. A few years I read about an (attributed) secret to Seinfeld's producitivity: "Don't break the chain". Just keep writing, and write every day.

I made my goal of a post every day for just over a month, and created this sequences: (20 Dec) simulating-pi, (21 Dec) vector-minimum, (22 Dec) gsl-colnorm-example, (23 Dec) fibonacci-sequence, (24 Dec) random-number-generation, (25 Dec) armadillo-sparse-matrix, (26 Dec) timing-rngs, (27 Dec) stl-inner-product, (28 Dec) stl-transform, (29 Dec) stl-transform-for-subsetting, (30 Dec) stl-random-shuffle, (31 Dec) stl-random-sample, (01 Jan) stl-for-each, (02 Jan) armadillo-subsetting, (03 Jan) accessing-environments, (04 Jan) armadillo-eigenvalues, (05 Jan) r-function-from-c++, (06 Jan) using-the-rcpp-timer, (07 Jan) sugar-function-clamp, (08 Jan) using-rcout, (09 Jan) first-steps-with-C++11, (10 Jan) simple-lambda-func-c++11, (11 Jan) eigen-eigenvalues, (12 Jan) getting-attributes-for-xts-example, (13 Jan) intro-to-exceptions, (14 Jan) a-first-boost-example, (15 Jan) a-second-boost-example, (16 Jan) timing-normal-rngs, (17 Jan) creating-xts-from-c++, (18 Jan) gsl-for-eigenvalues, (19 Jan) accessing-xts-api, (20 Jan) custom-as-and-wrap-example, (21 Jan) passing-cpp-function-pointers,

The Rcpp Gallery continues to grow, we now have 58 posts from 7 different authors. And it is open for business: new contributions are always welcome.

/code/rcpp | permanent link