## RcppEigen: R and Eigen via Rcpp
[](https://github.com/RcppCore/RcppEigen/actions?query=workflow%3Aci)
[](https://www.gnu.org/licenses/gpl-2.0.html)
[](https://www.mozilla.org/MPL/2.0/)
[](https://cran.r-project.org/package=RcppEigen)
[](https://cran.r-project.org/package=RcppEigen)
[](https://codecov.io/github/RcppCore/RcppEigen?branch=master)
[](https://packages.debian.org/sid/r-cran-rcppeigen)
[](https://github.com/RcppCore/RcppEigen)
[](https://www.r-pkg.org:443/pkg/RcppEigen)
[](https://www.r-pkg.org:443/pkg/RcppEigen)
[](https://cran.r-project.org/package=RcppEigen)
[](https://cran.r-project.org/package=RcppEigen)
[](https://stackoverflow.com/questions/tagged/rcpp)
[](https://doi.org/10.18637/jss.v052.i05)
### Synopsis
[Eigen](http://eigen.tuxfamily.org/index.php?title=Main_Page) is a C++ template library for linear algebra:
matrices, vectors, numerical solvers and related algorithms. It supports dense and sparse
matrices on integer, floating point and complex numbers, decompositions of such matrices,
and solutions of linear systems. Its performance on many algorithms is comparable with
some of the best implementations based on `Lapack` and level-3 `BLAS`.
RcppEigen provides an interface from R to and from [Eigen](http://eigen.tuxfamily.org/index.php?title=Main_Page) by
using the facilities offered by the [Rcpp](http://dirk.eddelbuettel.com/code/rcpp.html)
package for seamless R and C++ integration.
### Examples
A few examples are over at the [Rcpp Gallery](https://gallery.rcpp.org/tags/eigen/). A simple one is
```c++
#include