views:

86

answers:

2

I recently investigate a integration between ruby and R on Windows 7. So far, rinruby hangs (on my Windows7 machine) when I run a script. Now I learn from this post that rsruby does not work on Windows at all. Does anybody know a library that would work?

+2  A: 

Let me prefix this by saying that I am more of a Linux person than a Windows person ... but at some point the capabilities of the OSs do matter, as does their support for basic POSIX functionality etc.

Hence, it may not be a piece of cake to embed R into Ruby or link it on Windows, as handy as this may be for you. R is after all dependent on the MinGW toolchain on Windows.

As an alternative, consider the excellent Rserve---and I just noticed a seemingly new offspring RserveWin Simon now also provides. This merely needs to run somewhere, and you can then connect over tcp/ip. There are example clients for C/C++ and Java, and other projects such as for example pyRserve and this Rserve-Ruby-client which may fit the bill.

Edit One more Google search also leads to this talk about R / Ruby integration which refers to the RSRruby gem but that (according to another quick search) seems to have issue on Windows too. Maybe Rserve and a connection really is your best ticket.

Dirk Eddelbuettel
I think I will follow your advice and use a reserve as stand alone R server and call it from my program.
Skarab
+1  A: 

If you are able to run under JRuby then you may be able to use a Java-based bridge to R.

I currently use RSRuby to integrate R with a Rails application (running on OSX) but I am looking to switch to having a standalone R server shortly.

Ana Nelson