1919
2020### Synopsis
2121
22- RcppArmadillo provides an interface from R to and from [ Armadillo] ( https://arma.sourceforge.net ) by
23- utilising the [ Rcpp R/C++ interface library] ( http://dirk.eddelbuettel.com/code/ rcpp.html ) .
22+ RcppArmadillo provides an interface from R to and from [ Armadillo] [ armadillo ] by utilising the [ Rcpp
23+ R/C++ interface library] [ rcpp ] .
2424
2525### What is Armadillo?
2626
27- [ Armadillo] ( https://arma.sourceforge.net ) is a high-quality linear algebra library for the C++ language,
28- aiming towards a good balance between speed and ease of use. It provides high-level syntax and
29- [ functionality] ( https://arma.sourceforge.net/docs.html ) deliberately similar to Matlab (TM).
30- See [ its website] ( https://arma.sourceforge.net ) more information about Armadillo.
27+ [ Armadillo] [ armadillo ] is a high-quality linear algebra library for the C++ language, aiming towards
28+ a good balance between speed and ease of use. It provides high-level syntax and
29+ [ functionality] ( https://arma.sourceforge.net/docs.html ) deliberately similar to Matlab (TM). See
30+ [ its website] [ armadillo ] more information about Armadillo.
3131
3232### So give me an example!
3333
3434Glad you asked. Here is a light-weight and fast implementation of linear regression:
3535
3636``` c++
37- #include < RcppArmadillo.h >
37+ #include < RcppArmadillo/Lightest >
3838// [[Rcpp::depends(RcppArmadillo)]]
3939
4040// [[Rcpp::export]]
@@ -58,13 +58,16 @@ the file above to compile the function. A version is also included in the
5858package [as the `fastLm()`](https://github.com/RcppCore/RcppArmadillo/blob/master/R/fastLm.R)
5959function.
6060
61+ The `RcppArmadillo/Lightest` header includes [Rcpp][rcpp] via its `Rcpp/Lightest` header which
62+ precludes some more compile-time heavy features such as 'Rcpp Modules' which we may not need. See
63+ the [Rcpp][rcpp] docs more details about 'Light', 'Lighter' and 'Lightest'. In the example above,
64+ the switch saves about 15% to 20% of total compilation time.
65+
6166### Status
6267
63- The package is mature yet under active development with releases to
64- [CRAN](https://cran.r-project.org) about once every other month, and
65- widely-used by other CRAN packages as can be seen from the
66- [CRAN package page](https://cran.r-project.org/package=RcppArmadillo).
67- As of February 2024, there are 1118 CRAN packages using RcppArmadillo.
68+ The package is mature yet under active development with releases to [CRAN][cran] about once every
69+ other month, and widely-used by other CRAN packages as can be seen from the [CRAN package page][cran
70+ pkg]. As of February 2024, there are 1118 CRAN packages using RcppArmadillo.
6871
6972### Documentation
7073
@@ -75,8 +78,8 @@ matrix conversions.
7578
7679### Installation
7780
78- RcppArmadillo is a [CRAN package](https:// cran.r-project.org/package=RcppArmadillo) , and lives
79- otherwise in its own habitat on [GitHub](https://github.com/RcppCore/RcppArmadillo) within the
81+ RcppArmadillo is a [CRAN package][ cran pkg] , and lives otherwise in its own habitat on
82+ [GitHub](https://github.com/RcppCore/RcppArmadillo) within the
8083[RcppCore](https://github.com/RcppCore) GitHub organization.
8184
8285Run
@@ -94,3 +97,9 @@ Dirk Eddelbuettel, Romain Francois, Doug Bates, Binxiang Ni, and Conrad Sanderso
9497### License
9598
9699GPL (>= 2)
100+
101+
102+ [ armadillo ] : https://arma.sourceforge.net
103+ [ rcpp ] : https://www.rcpp.org
104+ [ cran ] : https://cran.r-project.org
105+ [ cran pkg ] : https://cran.r-project.org/package=RcppArmadillo
0 commit comments