[R] Interfacing R and C++

Duncan Murdoch murdoch at stats.uwo.ca
Tue Nov 10 19:05:26 CET 2009


On 11/10/2009 12:35 PM, Nathan Harmston wrote:
> Hi,
> 
> I m currently working on interfacing R and C++ (passing a matrix from
> R to C++, doing some stuff, returning a vector of results). There seem
> to be a number of ways of doing this, such as rcpp and swig. Is there
> a recommended way of doing this? In the long run I would like what I m
> working on to be portable across OS etc.

Just follow the instructions in the Writing R Extensions manual.  You're 
not doing anything very unusual, so rcpp and swig may be overkill.

Duncan Murdoch




More information about the R-help mailing list