SC2

Statistical Computing 2

Advanced Rcpp II


This chapter explains how to structure larger R/C++ projects. In particular, we start by explaining how C++ code divided into several files can be compiled and loaded using Rcpp::sourceCpp. For larger projects, and especially projects that must be shared with other people, this way of working is not ideal and building an R package containing your R and C++ code is much preferable. Hence, the bulk of this chapter is dedicated to explaining how to:

The chapter consists of the following sections: