Extending R with C++: A Brief Introduction to Rcpp

Citation
Eddelbuettel Dirk et Balamuta James Joseph, Extending R with C++: A Brief Introduction to Rcpp, American statistician , 72(1), 2018, pp. 28-36
Journal title
ISSN journal
00031305
Volume
72
Issue
1
Year of publication
2018
Pages
28 - 36
Database
ACNP
SICI code
Abstract
R has always provided an application programming interface (API) for extensions. Based on the C language, it uses a number of macros and other low-level constructs to exchange data structures between the R process and any dynamically loaded component modules authors added to it. With the introduction of the Rcpp package, and its later refinements, this process has become considerably easier yet also more robust. By now, Rcpp has become the most popular extension mechanism for R. This article introduces Rcpp, and illustrates with several examples how the Rcpp Attributes mechanism in particular eases the transition of objects between R and C++ code