useR

Tutorial: C++ and Rcpp for beginners


Romain Francois and Hadley Wickham, Rice University

Overview

This tutorial will provide a quick introduction to fundamental concepts of C++ and teach an easy way to connect R and C++ with Rcpp. You will learn how to:

This tutorial will be interactive: you will have plenty of opportunities to practice what you learn by writing Rcpp code

Prerequisites

You should be comfortable writing functions in R; no prior C or C++ knowledge is needed. (If you’re a C++ expert this course will probably be too basic for you)

Equipment

You’ll need a laptop that can build R packages. That means on Windows, the Rtools needs to be present and working, on OS X the Xcode package should be installed, and on Linux things just generally just work. You can check that your set up works by running

library(Rcpp)
cppEval(’1 + 1’)
We’ll be available before the class to help you troubleshoot if you can’t get this to work.

Related Links

Spread the Word





Tweet