This is a small tutorial I wrote for C++ and R integration via Rcpp