[R] RSPerl and Statistics::R

Stefan Evert stefan.evert at uos.de
Fri May 8 01:27:53 CEST 2009


> Being a Perl hacker for some time, and wanting to leverage what R  
> provides, I've been trying to work with Statistics::R and RSPerl.
>
> The former has a race condition that breeds some unreliability and  
> the latter seems to have issues all around, and neither has been  
> updated in some time.

I have been using RSPerl for quite a long time, and for the same  
purpose as you (i.e. I'm only interested in running R from Perl, not  
vice versa).  I've had to hack practically every release of RSPerl to  
get it to build and install on my computers, especially on Mac OS X  
(where the R build process is completely at odds with universal  
binaries and the default Perl configuration).  Once installed, it's  
been very fast and reliable, though, at least for simple operations  
(basically, I want to pass numeric vectors between R and Perl and  
apply R functions to them).

When I became aware of Statistics::R, I was surprised about its  
extremely simple approach, because I expected this design to run afoul  
of all sorts of race conditions, buffers not being flushed, etc.;  
which your posting appears to confirm.  In my own software, I use  
Perl's Expect module as a fallback, but this is _extremely_ inefficient.

> Are these projects are abandoned, or is there some effort currently  
> being undertaken to either refresh or reinvent the glue binding Perl  
> and R together?
>
> If not, then I'm probably going to give it a go myself, but I'm sort  
> of hoping that there's a jewel of a library out there that doesn't  
> come up as quickly in Google as the aforementioned libraries.

With all the problems that RSPerl has -- and they're mostly related to  
using R from Perl AFAIK -- I'm wondering if it wouldn't make for  
people like us to develop a Perl client for the Rserve protocol (see http://www.rforge.net/Rserve/) 
.


Best,
Stefan Evert

[ stefan.evert at uos.de | http://purl.org/stefan.evert ]




More information about the R-help mailing list