I am trying to setup RInside at work where we are forced to use a Windows environment.
I have installed RTools and downloaded an RInside binary from CRAN.
My
I have a similar setup at work, so I gave this a shot. I'm able to build the examples after I specify R_LIBS_SITE
. Note that it must be a Windows path, not a Cygwin path!
export R_LIBS_SITE=c:/R/site-library
You seem to have two distinct problems here:
Your $PATH
is probably off, or as Josh had hinted, your $R_HOME
assignment is wrong. If make
is indeed the binary from Rtools, and the paths you assign are correct, then the builds succeed. That is the general rule for building R packages on Windows: Follow the manual very diligently and it will work.
RInside is broken on Windows, sorry. It will build, and you will get segfaults. Romain and I clearly state so in the documentation.
As Romain and I work almost exclusively on OS X and Linux, respectively, we would appreciate debugging help. It should be doable, but it probably requires some serious willingness to learn about R internals as something in the memory subsystem goes belly-up. Which it clearly does not on OSs with an X in their name.
Updated on 08 Dec 2011: RInside 0.2.5, on CRAN as of today, restores the Windows functionality--using the fix James notes in the other comment.
I spent a little time today looking at the bug with the windows version of RInside. I believe that I have discovered the bug which is as follows:
In RInside::initialize(……) the structRStart structure is populated however this now requires extra fields to be populated in the case of windows as shown in Rf_initEmbeddedR() from R\src\gnuwin32\embedded.c.
Rp->rhome = RHome;
Rp->home = getRUser();
Rp->CharacterMode = LinkDLL;
Rp->ReadConsole = myReadConsole;
Rp->WriteConsole = myWriteConsole;
Rp->CallBack = myCallBack;
Rp->ShowMessage = askok;
Rp->YesNoCancel = askyesnocancel;
Rp->Busy = myBusy;
Equivalent assignments will be necessary in RInside.cpp in order to provide valid callbacks.