Skip to content
Building packages for R and Python sharing a C++ codebase. Showcases the usage of Rcpp and Boost.Python.
C++ R Makefile Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Building Packages for R and Python

This is the repository for the tutorial I gave at the OpenMunich 2019.

It showcases how to create packages for R and Python that share a common codebase: core functionality is written in C++, Rcpp is used to create bindings for R, and Boost.Python is used to create bindings for python.

How to use this tutorial

Checkout the releases in this git to see a step-by-step tutorial.

More information

Slides for the talk are available in this repo as well.


Code was tested on Ubuntu 18.04.1 LTS 64 Bit, Boost 1.65.1 & R 3.6.1. Since there is no bleeding-edge-functionality used, it should work with earlier versions of Boost and R just as well.

sudo apt install build-essential libboost1.65-all-dev r-base
Rscript --slave --no-save --no-restore-history \
  -e 'install.packages(c("Rcpp", "RUnit"), dependencies = T)'
You can’t perform that action at this time.