3 demo packages
In the process of working out how to best call C code in an R package, I created 3 small demonstration packages showing how C code can be included and called within a package.
Rough comparison of
|No real understanding of R objects
|Need to understand SEXP macros & internals
|C++ classes hide the complexity of the SEXP internals
|Basic C code. Numeric calcs.
|Complex C code. Can manipulate R objects from C
|Complex C and C++ code involving numerics and R objects
|Simple to understand and use
|Simple. No unnecessary copying.
|Great documentation. Wrapping of R objects very intuitive.
|Too simple for most interesting things
|Need to understand SEXP & R internals
|Performs copying of data to call functions
|Demo R package