A simple and efficient access to R from Python |
|
After few months of delay, rpy2-2.3.0 is finally ready for a first release. Significant changes were made in the underlying C code (R objects protected from garbage collection by rpy2 can now be tracked), and there are new visible features such as interface to the R help and a very experimental system to build R graphical devices from Python.
The version 2.2.2 is out. It fixes a bug when using repr() on a list with a "non-vector" item.
The version 2.2.0 was released, followed closely by a version 2.2.1 (fixing an install issue with Python 3) The source package is available on pypi and sourceforge. Binary builds were almost instantly available for debian, thanks to Dirk, and are now making their way through various Linux or BSD distributions.
Pre-releases for 2.2.0 have started, and are available as snapshots from bitbucket . Latest is 2.2.0-alpha1 but more alphas are expected as the Python 3 port is not yet as stable as one would expect.
A new bugfix release for the 2.1.x series is out. Check the documentation for details
Bugfix release in the 2.1.x series. R arrays with a shape of length > 2 where not correctly exposed to numpy. This was fixed in the 2.2.x branch, and backported to 2.1.x.
Among the new features in the upcoming version 2.2.0, there is the possibility to write in Python the functions to be passed to higher-order R functions. In other words, it is becoming possible to write a Python function and expose it to R in such a way that the embedded R engine can call it. As an example, let's consider the R function optim() that looks for optimal parameters for a given cost function. The cost function should be passed in the call to optim() as it will be repeatedly called as the parameter space is explored, and it is now possible to write that cost function in Python, as the code below demonstrates it. from rpy2.robjects.vectors import FloatVector from rpy2.robjects.packages import importr import rpy2.rinterface as ri stats = importr('stats') # Rosenbrock Banana function as a cost function # (as in the R man page for optim()) def cost_f(x): x1 = x[0] x2 = x[1] return 100 * (x2 - x1 * x1)**2 + (1 - x1)**2 # wrap the function f so it can be exposed to R cost_fr = ri.rternalize(cost_f) # starting parameters start_params = FloatVector((-1.2, 1)) # call R's optim() res = stats.optim(start_params, cost_fr) The example is working verbatim with today's snapshot of the code repository (branch version_2.2.x), although few modifications might be needed in the future. Although this is development code and version 2.2.0 is scheduled to be released some time next year, the documentation already outlines this feature. Early testing is welcome, and issues can be reported on the bitbucket tracker.
After a very short-lived release 2.1.6, a new bugfix release for the 2.1.x series is out. It should definitely fix the build/install issues when libraries are in least expected locations.
In R handling data structures in a foreign language (read C/C++) is done through an external pointer. Those pointer do not obey the pass-by-value rule and are not copied. The version 2.2.x has a new class rpy2.rinterface.SexpExtPtr to represent those objects. With this, handling from Python such C-level constructs understood by some R packages, using for example ctypes, becomes possible. Further use of this for calling back Python functions from R within the rpy2 system will be tried in the future.
Bugfix release for the 2.1.x series. It only fixes (some of) the issues when building/installing while R libraries are in lesser expected places.
Development for the version 2.2.0 of rpy2 is moving on, and automagic exposure of R S4 classes to Python is almost there. In practice this means that any class defined in the embedded R can be exposed as a corresponding Python class, with that Python class defined on the fly from the R class definition. Although this is still under development, there is already documentation for how to use it.
Work from the GSoC fixing compatibility for Python 3 is being merged to the main repository. Installation should now run smoothly when using a fresh version of the code repository: hg update -C version_2.2.x python3.1 setup.py install
The time for the Google Summer of Code project is about to finish, and great things have been happening. Beside the port to Python 3, the older graphical device attempt received (much needed) attention and it is becoming possible to display an R plot inside a matplotlib window. Details are on Greg's blog .
Python-to-R bridges known to me are in chronological order: RSPython, RPy, rpy2, pyrserve, pyper> Each have its own approach, and likely strength, but disputable claims about either features or performances seem to have appeared. It's time for a full suite of benchmark and comparison of feature list. Stay tuned, and check for the section about performances in the documentation in the meanwhile.
Since the 2.0.x series, there is no longer any binary for Microsoft Windows distributed. The version in the 2.0.x series was already stripped out of some of the functionalities the UNIX-like systems can enjoy. Patches to compile and binaries were contributed, but there was not much progress regarding features. Currently, the only blocking issue for having a Windows port is time / resources: a win32 port, and eventually a win64 port, will require sponsorship in order to happen. If you or your organization are interested, please do contact the rpy2 author.
A bug-fix release in the 2.1.x series is out. Details about the changes are in the documentation. The source package is available on sourceforge and on Pypi (see Section "Download").
The Google Summer of Code (GSoC) project is progressing. Work is currently a proof of concept, starting with a code base older than the currently released 2.1.3 or 2.2.0-dev, but it is expected to be merged with 2.2.0-dev in the near future. The code can currently be found in the code repository for the GSoC, and a the port to the main development will transit through a patch queue for 2.2.0-dev
The 2.1.x series are now in maintenance mode, and new development is happening in the 2.2.x branch. There is no fixed roadmap or expected release date yet.
rpy2-2.1.2 is out. This release is the second bugfix release in the 2.1.x series. Check the documentation for details about the changes.
The Google Summer of Code (GSoC) 2010 project to port rpy2 to Python 3 was accepted. If all goes well, rpy2 will work with Python 3 some time after the summer. More on that will hopefully appear soon.
rpy2-2.1.1 is already out. This release is a bugfix release, adding missing less-frequently used functions in the ggplot2 mapping and instabilities with NA values.
rpy2-2.1.0 is out. This release introduces API-breaking changes when compared to the 2.0.x series, but is expected to significantly improve the intregration of R into Python. A rough guide about how to upgrade code is available in the documentation.
The release candidate for rpy2-2.1.0 is out. Changes since the beta releases address stability and documentation. Source packages are available as archives on the bitbucket and Sourceforge download page.
Beta release for rpy2-2.1.0. Changes since alpha3 address stability, documentation, and few features. Source packages are available as tar.gz or zip archives on the bitbucket download page.
Third and, if everything goes according to the plan, last alpha release for rpy2-2.1.0. Changes since alpha2 concern better usability, ability to take slices out of vectors, NA types, robustness on 64bit platforms and when dealing with large integers (Python can switch from int to long, but R cannot). Source packages are available as tar.gz or zip archives on the bitbucket download page.
Progress over the last week, with more documentation, more unit tests, bug fixed, and few new features. Source packages are available as tar.gz or zip archives on the bitbucket download page.
While there are API-breaking changes from rpy2-2.0.x, rpy2-2.1.0 mostly develops the rpy2.robjects layer with features such as:
Source packages are available here or there and instructions to install the package are in the documentation. No binary builds are provided, but feedback on eventual complication when trying to build are welcome. This is hoped to build on OS X (Leopard, Snow Leopard), as well as on win32 (winXP, no experience with Vista or Windows 7).
Rpy2 release 2.0.8 release is a bug in the robjects interface where Python long integers could not be converted to R longs.
Rpy2 release 2.0.7 is fixing bugs reported under MS Windows and with rpy_classic. Details regarding what changed can be found in the file NEWS, as well as online in the documentation.
rpy2-2.1.0 is hoped to be somewhat compatible with Python 3, and a new branch was created on the bitbucket repository in order to work on it. If using the 2.1.x-dev from the code repository, remember to specify that you are after the branch "version_2.1.x".
rpy2-2.0.x is available from a number of distribution-specific package repositories. Although debian users probably remain first served (thanks to Dirk Eddelbuettel), packaging for other distributions is picking up with Gentoo, Mandriva, openSUSE, RedHat/Fedora, Ubuntu. Fink and Macports packages are also available for OS X users. Microsoft Windows users can download binaries for 2.0.x from Sourceforge. Starting with 2.0.6, the binaries are .msi installers.
The release 2.0.6 does not have user-visible changes. Changes adressed issues when buildin under OS X with framework, and under win32. Win32 can again be downloaded from the Sourceforge page.
The title says it all.
The release 2.0.5 is mostly fixing two infrequent bugs causing a crash.
The release 2.0.4 is fixing a memory leak present when build R vectors from existing Python sequences, as well as few other minor issues. The complete list of changes is in the documentation.
The release 2.0.3 is fixing limitations in the low-level interface, and introduces a few minor additions.
The release 2.0.2 is fixing some of the few bugs found in 2.0.1
The primary repository for RPy2's source code is now at bitbucket. Propagation of the changes to SF's SVN will be organised soon.
Thanks to Dirk Eddelbuettel, rpy2 is now part of Debian.
Bug-fix Relase for rpy2-2.0. The source package then pre-built binaries for win32 are being uploaded. The online documentation is here.
Relase ! rpy2-2.0.0 is out. The source package and pre-built binaries for win32 were made available few days ago. The online documentation is here.
The release candidate for rpy2-2.0.0 is out. The source package is available on the sourceforge page. Pre-built binary for win32 should come shortly after. The online documentation is here.
The beta release for rpy2 is out. The source package is available on the sourceforge page. Pre-built binary for win32 are also available. The online documentation is here.
A new alpha release for rpy2 is out. The source package is available on the sourceforge page. Unfortunately there is no pre-built binary for win32 at moment, but it should compile (and you could contribute the binary). The online documentation is here.
The third alpha release for rpy2 is out. The source package, and pre-built binaries for win32 are available on the sourceforge page.
The second alpha release for rpy2 is out. The source package, and pre-built binaries for win32 are available.
Thanks to hard work by John Reidel, the RPy manual has been converted into a Wiki. This should make it easer for everyone (especially end users) to contribute to the documentation. Take a look at http://rpy.wiki.sourceforge.net/Manual+-+Top.
Hello RPy'ers: I have just uploaded RPy version 1.0.2cd New features:
Hello RPy'ers: I have just uploaded RPy version 1.0.1.
CHANGES IN RPY 1.0.1 - 2007-11-29
Hello RPy'ers: I have just uploaded RPy version 1.0.0 New Features:
Hello RPy'ers: I have just uploaded RPy version 1.0 RC 3. Hopefully this will be the last release candidate before 1.0. This release fixes several bugs, particular those related to new versions of R, including the infamous "C stack limit error" which occured on *nix systems in some contexts, such as resizing X11 windows. This release should work properly with R versions through 2.5.0. RC3 also introduces support for NumPy.
Hello RPy'ers: I have just uploaded RPy version 0.99.0 . This is intended to serve as a preliminary to a 1.0 release, which I hope to do in about a month's time. This release fixes several bugs on windows, where the build process has been made dramatically easier, thanks to MinGW's (new?) ability to link directly against DLL's. Please see the file INSTALL.WINDOWS for details. In addition, the windows builds now work for any released version of R from 2.0.0 through 2.2.1. New features:
Bug fixes
Other
The RPy source code has been migrated from CVS to
Subversion. See the SF Project
Subversion page for access information.
Bug fixes
New features
Bug fixes
New features
Bug fixes
Unresolved bugs
New features
Bug fixes
New features:
Bug fixes:
New features:
A binary for RPy 0.3.6 built against R 2.0.0 is now available on the Downloads page.
A binary for RPy 0.3.5 built against R 1.9.1 is now available on the Downloads page.
RPy 0.3.5 contains changes to allow building Mac OS X as well as some bug fixes for Windows. Get RPy 0.3.5 from the Downloads page.
Windows binaries for Rpy 0.3.4 have been provided by Matjaz Kukar and are available for download. Get them from the Downloads page. IMPORTANT: You will need to manually set the PATH environment variable to include the directory where Rlib.dll lives. See the Release Notes for details on how to do this.
RPy 0.3.3 contains changes that allow it to run properly with R versions 1.8.0 and later. Further, the Windows and Unix source codes have been merged. This should make it easier to fix bugs and add features. Get RPy 0.3.3 from the Downloads page.
Gregory R. Warnes has joined the RPy project as a project manager. His first project is to get RPy working with R 1.8.X. Next he will focus on combining the Unix and Windows source trees. |
|