[R] r and c++
Dirk Eddelbuettel
edd at debian.org
Thu Feb 12 16:38:10 CET 2009
Javier,
On 12 February 2009 at 16:16, JC wrote:
| is there a way to integrate R language within a c++ programme? That is,
| is there something like an R library I can incorporate in my c++ code?
I have two projects on R-Forge.R-Project.org that may be of interest:
Rcpp which makes it easy to pass R objects to and from C++ routines,
ie when you are building R packages, and the control resides
in the R session;
RInside which provides C++ classes to make embedding R into your C++
applications easier, and which uses some of the Rcpp classes
for conversion.
RInside may be what you are looking for. The package is currently somewhat raw
-- no configure logic, and the Makefile has the path that works for me (on
Debian / Ubuntu) but if you know enough about C, C++, R, ... to be tempted by
this you probably also know how to adapt this.
The code itself is mature. I had used variants of RInside for quite some
time, and the inner workings are the same as in our well-tested littler
scripting frontend to R.
And yes, I should put up a webpage for RInside as well ...
Hth, Dirk
--
Three out of two people have difficulties with fractions.
More information about the R-help
mailing list