RInside release 0.2.0

December 22, 2009

(This article was first published on dirk.eddelbuettel, and kindly contributed to R-bloggers)

RInside, a set
of convenience classes to facilitate embedding of R
inside of C++ applications, was updated to release 0.2.0 over the weekend.
Sources as well as binary packages are at CRAN; sources are also at
my RInside page

The biggest news is that we now support builds on Windows — if and only
if you use the R toolchain — more on that below. Since I had first released
RInside people
had emailed about support on Windows. However, Richard Holbrey deserves
special mention as he actually sat down and tried to build it. Over a few
email exchanges we made decent progress, but stalled. More recently, I
sat down and had another go and lo and behold, it works. This required a few
#ifdef statements here and there, as well as a function
setenv() which Windows does not have — Richard kindly helped
here and borrowed most of the code from R itself.

Now, to make this plain: you need gcc (as this is how R
itself is built). This gcc compiler is the native compiler on Linux and OS X.
But on Windows this requires installing the
Rtools compiled by Duncan Murdoch
as detailed in the
The Windows Toolset
appendix to the R Installation manual. Do not, I repeat, do not report an
error if you fail to build this with another compiler as this is not supported.

That said, if you have the proper tools, things are peachy. Install the
package, change into the examples directory installed with it
and say make (or on Windows: make -f Makefile.win).
That’s it — now run the examples (which on Windows will most likely require
setting the environment variable R_HOME). Now you can run
simple examples like the one from the
blog post
or any of the other ones.

Happy embedding!

To leave a comment for the author, please follow the link and comment on their blog: dirk.eddelbuettel.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.