C++ and Rcpp
Advanced R
Slides
Here’s a link to the slides in a new window.
Here are the slides embedded:
Resources
Reading
Similar scope to this module: Gillespie, C and Lovelace, R, Efficient R programming, Rcpp section
https://csgillespie.github.io/efficientR/performance.html#rcpp
Going a bit further: Wickham, H, Advanced R (2nd edn), Rewriting R code in C++ chapter
Not very polished, but broader coverage of Rcpp functionality: Tsuda, M.E., Rcpp for everyone
The Rcpp vignettes, accessed via
browseVignettes("Rcpp")
or CRANThe unofficial Rcpp API documentation
Case studies (optimising by improving R code and/or using C++)
- https://robotwealth.com/optimising-the-rsims-package-for-fast-backtesting-in-r/
- https://gallery.rcpp.org/articles/bayesian-time-series-changepoint/
- The Rcpp Gallery has all sorts of examples, many illustrating advanced features of Rcpp).