add-rcpp-integration
Installation
SKILL.md
Add Rcpp Integration
Integrate C++ code into an R package using Rcpp for performance-critical operations.
When to Use
- R function is too slow and profiling confirms a bottleneck
- Need to interface with existing C/C++ libraries
- Implementing algorithms that benefit from compiled code (loops, recursion)
- Adding RcppArmadillo for linear algebra operations
Inputs
- Required: Existing R package
- Required: R function to replace or augment with C++
- Optional: External C++ library to interface with
- Optional: Whether to use RcppArmadillo (default: plain Rcpp)
Procedure
Related skills