Code and instructions for integrating R and C++