NEW MEETING LOCATION - ON LINE!!!
Time and Location
Integrating Reusable C++ Code in R Packages
One of the most time-consuming, tedious, and thankless tasks a quantitative developer frequently confronts is writing interfaces to C++ code from other languages such as Excel VBA, Python, and R. Fortunately, this process has been made far less painful when interfacing to a front-end in R, thanks to the Rcpp R package.
The open source Rcpp package was first developed about ten years ago. It has since evolved significantly in terms of providing a platform for rapid development, plus convenient build and documentation tools, all integrated into the RStudio IDE. Rcpp represents a major breakthrough in allowing a programmer to farm out computationally-intensive tasks to C++, return the results to R, and then use these results within other R functions, including R’s powerful data visualization tools. Although there is a fair amount of documentation available on using Rcpp, there does not seem to be much written on how to ensure a clean separation between the R interface and the C++ code.
In this presentation, we will discuss how to set up an R package project in RStudio, develop C++ interfaces with Rcpp, and then call standard C++ code that remains reusable for other applications, all with minimal fuss.
Daniel Hanson is a full-time lecturer in the Computational Finance & Risk Management program within the Department of Applied Mathematics at the University of Washington. His appointment followed over 25 years of experience in private sector quantitative development in finance and data science.
A Word From Our Sponsor
Sorry no sponsor this month.