[Rcpp-devel] [ANN] RcppArmadillo 0.4.450.1.0

Dirk Eddelbuettel edd at debian.org
Tue Sep 30 03:53:44 CEST 2014

This is a few days late, but a new RcppArmadillo hit CRAN a week week ago. 

See below for a short discussion of the change in the (fallback,
Armadillo-provided) RNG which we now redirect to R (as CRAN does not like to
see use of the (knowm, bad) rand() generator in C -- even though
(Rcpp)Armadillo would of course first use a proper std::rand() from C++11
given a suitable compiler).  We may add another #ifdef here to allow for
finer control. 

The text is taken from the blog post at


and included as text (without links) below.

Again, a big thanks to Conrad for a very productive short exchange on
accomodating the CRAN requirement concerning the default RNG.

Cheers, Dirk

   RcppArmadillo 0.4.450.1.0

   Continuing with his standard pace of approximately one new version
   per month, Conrad released a new minor release of Armadillo a few
   days ago. As before, I had created a GitHub-only pre-release which
   was tested against all eighty-seven (!!) CRAN dependents of our
   RcppArmadillo package and then uploaded RcppArmadillo 0.4.450.0 to

   The CRAN maintainers pointed out that under the R-development
   release, a NOTE was issued concerning the C-library's rand() call.
   This is a pretty new NOTE, but it means using the (sometimes poor
   quality) rand() generator is now a no-no. Now, Armadillo being as
   robustly engineered as it is offers a new random number generator
   based on C++11 as well as a fallback generator for those unfortunate
   enough to live with an older C++98 compiler. (I would like to note
   here that I find Conrad's continued support for both C++11, offering
   very useful modern language idioms, as well as the fallback code for
   continued deployment and usage by those constrained in their choice
   of compilers rather exemplary --- because contrary to what some
   people may claim, it is not a matter of one or the other. C++ always
   was, and continues to be, a multi-paradigm language which can be
   supported easily by several standard. But I digress...)

   In any event, one cannot argue with CRAN about their prescription of
   a C++98 compiler. So Conrad and I discussed this over email, and came
   up with a scheme where a user-package (such as RcppArmadillo) can
   provide an alternate generator which Armadillo then deploys. I
   implemented a first solution which was then altered / reflected by
   Conrad in a revised version 4.450.1 of Armadillo. I packaged, and now
   uploaded, that version as RcppArmadillo 0.4.450.1.0 to both CRAN and
   into Debian.

   Besides the RNG change already discussed, this release brings a few
   smaller changes from the Armadillo side. These are detailed below in
   the extract from the NEWS file. On the RcppArmadillo side, we now
   have support for pkgKitten which is both very exciting and likely the
   topic of another blog post with an example of creating an
   RcppArmadillo package that purrs. In the process, I overhauled and
   polished how new packages are created by
   RcppArmadillo.package.skeleton(). An upcoming blog post may provide
   an example.

    Changes in RcppArmadillo version 0.4.450.1.0 (2014-09-21)

       * Upgraded to Armadillo release Version 4.450.1 (Spring Hill

            * faster handling of matrix transposes within compound

            * expanded symmatu()/symmatl() to optionally disable taking
              the complex conjugate of elements

            * expanded sort_index() to handle complex vectors

            * expanded the gmm_diag class with functions to generate
              random samples

       * A new random-number implementation for Armadillo uses the RNG
         from R as a fallback (when C++11 is not selected so the
         C++11-based RNG is unavailable) which avoids using the older
         C++98-based std::rand

       * The RcppArmadillo.package.skeleton() function was updated to
         only set an "Imports:" for Rcpp, but not RcppArmadillo which
         (as a template library) needs only LinkingTo:

       * The RcppArmadillo.package.skeleton() function will now prefer
         pkgKitten::kitten() over package.skeleton() in order to create
         a working package which passes R CMD check.

       * The pkgKitten package is now a Suggests:

       * A manual page was added to provide documentation for the
         functions provided by the skeleton package.

       * A small update was made to the package manual page.

   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

http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the Rcpp-devel mailing list