KevCaz's Website

Rcpp profoundly changed the R landscape. Basically, it made all performance bottlenecks vanish and I’m not surprised that so many packages are now using it:

As of May 2017, 1026 packages on CRAN and a further 91 on BioConductor deploy Rcpp to extend R. (www.rcpp.org - October 17, 2018)

Even people that do not know nothing about Rcpp are likely to use it on a regular basis as most packages for data science are now linked to Rcpp (e.g. dplyr).

Even though I am comfortable with Rcpp, I still do silly mistakes. Yesterday for instance, I was working on a package I am contributing to and ran into a problem that I should have easily avoided. I compiled one of the .cpp files without any issue but after a while (and when I tried to exit R) I got the error below:

1
2
3
4
5
6
7
8
*** caught segfault ***
address (nil), cause 'unknown'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

So after I spent few minutes wondering what did I do wrong, I realized that since the last time I worked on this package I had installed newer versions of R, Rcpp and gcc. So, I figured out that it is likely that the compilation process must have changed enough that I needed to rebuild all .o (object) and .so (shared object) files files. That’s what I did and it worked 🏆!