views:

271

answers:

2

I am using Python 3.1.1 on Mac OS X 10.6.2 and need an interface to R. When browsing the internet I found out about RPy. Is this the right choice?

Currently, a program in Python computes a distance matrix and, stores it in a file. I invoke R separately in an interactive way and read in the matrix for cluster analysis. In order to simplify computation one could prepare a script file for R then call it from Python and read back the results. Since I am new to Python, I would not like to go back to 2.6.

+2  A: 

I don't believe there are any available options for Python 3.1.1.

The current status of R-Python bindings:

At the moment, three options: RPy, RPy2, and RSPython.

RPy and RPy2 were developed and are maintained by the same team of developers; RPy2 is a substantial rewrite of RPy (which in turn is based on Omega hat's RSPython).

RPy is still actively maintained.

RSPython is still available but i believe is no longer actively developed. I looked a couple of months ago and the latest version i could find (0.7-1) was released in October 2006.

The most current stable version as well as the dev version (2.1 rc) of RPy2 is optimized for R version 2.10 (current stable version) and Python version 2.6 (ie, those are the versions used in development). I am not aware of any announcement by the RPy2 developers to support Python versions 3.x.

doug
seems there is a fourth option available: PypeR [http://sourceforge.net/projects/rinpy/files/ and http://www.jstatsoft.org/v35/c02/paper]
radek
@radek: and even a fifth one: pyRserve [http://www.ralph-heinkel.com/pyRserve/].
lgautier
@lgautier: haven't seen this one.. thanks for sharing!
radek
+3  A: 

Python 3 is considered, as there is an experimental (and broken) branch for rpy2-2.1 / Python 3 branch in the repository.

In order to undertake a full port, we have an application for a Google Summer of Code project consisting in porting rpy2 to Python 3.

If we get accepted, this means that rpy2 2.1 will be available for Python 3.1 at the end of the summer.

edit: the proposal was accepted and the port to Python is being worked on. Compatibility with Python 3 should be out some time after the summer.

edit: the GSoC code for Python3 compatibility is now in the code repository (branch version_2.2.x).

lgautier