[Rcpp-devel] New version of RcppEigen, with an introductory vignette, now on CRAN

Douglas Bates bates at stat.wisc.edu
Fri Oct 28 16:13:59 CEST 2011


I uploaded RcppEigen_0.1.3 yesterday, upgrading to Eigen 3.0.3 and
adding an introductory vignette.  The update is now available on CRAN.

Both RcppArmadillo and RcppEigen provide access to numerical linear
algebra (matrix and vector operations and decompositions) C++ template
libraries.  Eigen provides classes and methods that give both high
performance and access to the details of the different decompositions
in an object-oriented framework.  Dirk and I have used an example of
least squares fits including the standard errors of the coefficient
estimates across various platforms.  An infrequently used but
important consideration is the ability to handle a rank-deficient
model matrix.  In the vignette I describe several approaches using
Eigen and provide a benchmark comparison.  The fastest methods from
Eigen are about 12 times as fast as R's lm.fit function, but this
ratio can vary according to the version of the BLAS that being used.

If you run the benchmark yourself (install the packages RcppEigen,
rbenchmark and, optionally, RcppArmadillo and RcppGSL packages then
execute

source(system.file("examples", "lmBenchmark.R", package="RcppEigen"))

I would appreciate it if you could email me the results.  The
benchmark takes about 5-6 minutes to run on my desktop but you can cut
that to about 3 minutes if you don't have RcppGSL installed.  It
happens that the "fastLm" function in RcppGSL is dreadfully slow -
about 150 times slower than the fastest methods.


More information about the Rcpp-devel mailing list