• Dirk Eddelbuettel
Part of the Use R! book series (USE R, volume 64)


The RcppEigen package provides an interface to the Eigen library. Eigen is a featureful C++ library which deploys modern template meta-programming techniques. It is similar to Armadillo but provides an even more granular application-programming interface (API). This chapter provides an introduction to the Rcpp Eigen package by introducing the core data structures, illustrating some of the available matrix decomposition methods and concludes with a case study of particular C++implementation (providing what is called a “factory” pattern) for different matrix decomposition approaches in order to provide a faster reimplementation of the lm method.


Matrix Decomposition Member Function Linear Model Estimation Matrix Decomposition Method Constant Assignment 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. Abrahams D, Gurtovoy A (2004) C++ Template Metaprogramming: Concepts, Tools and Techniques from Boost and Beyond. Addison-Wesley, BostonGoogle Scholar
  2. Bates D, Eddelbuettel D (2013) Fast and elegant numerical linear algebra using the RcppEigen package. Journal of Statistical Software 52(5), URL
  3. Bates D, François R, Eddelbuettel D (2012) RcppEigen: Rcpp integration for the Eigen templated linear algebra library. URL, R package version
  4. François R, Eddelbuettel D (2010) RcppGSL: Rcpp integration for GNU GSL vectors and matrices. URL, R package version 0.2.0
  5. François R, Eddelbuettel D, Bates D (2012) RcppArmadillo: Rcpp integration for Armadillo templated linear algebra library. URL, R package version
  6. Guennebaud G, Jacob B, et al (2012) Eigen v3. URL
  7. Sanderson C (2010) Armadillo: An open source C++ algebra library for fast prototyping and computationally intensive experiments. Tech. rep., NICTA, URL

Copyright information

© The Author 2013

Authors and Affiliations

  • Dirk Eddelbuettel
    • 1
  1. 1.River ForestIllinoisUSA

Personalised recommendations