EuroPython 2014 pyRserve-slides now available online

September 19, 2014 at 11:50 AM | categories: Python, R, pyRserve | View Comments

After our well-attended Python Meetup last Wednesday in Heidelberg about "Connecting Python to other programming languages for scientific computing" I had been approached to publish the slides of my pyRserve talk (which has been the same as the one I've given at EuroPython in Berlin, for those who are interested). These are now online, so feel free to download them.

Read and Post Comments

pyRserve 0.8.1 released

July 18, 2014 at 10:20 AM | categories: Python, R, pyRserve | View Comments

Just in time for EuroPython in Berlin a new version of pyRserve just got released yesterday. If you happen to come to the conference there will be an intoductory talk on pyRserve on Fri 25h of July titled "Combining the powerful worlds of Python and R". Would be great to see you there.

About pyRserve

pyRserve is a (pure python) client for connecting Python to an R process on a remote server via TCP-IP (using Rserve). R is one of the most important and most widely spread open source statistic packages available.

Through such a pyRserve connection the full power of R is available on the Python side without programming in R. From Python variables can get set in and retrieved from R, and R-functions can be created and called remotely. No R-related libraries need to be installed on the client side, pip install pyRserve is all that needs to be done.

Sample code

This code assumes that Rserve (the part that connects the R engine to the network) already is running. Details can be found in the pyRserve docs.

>>> import pyRserve
>>> conn = pyRserve.connect('Rserve.domain.com')
>>> conn.eval('sum( c(1.5, 4) )') # direct evaluation of a statement in R
5.5
>>> conn.r.myList = [1, 2, 3] # bind a Python list in R to variable 'myList'

>>> conn.voidEval('func1 <- function(v) { v*2 }')  # create a function in R
>>> conn.r.func1(4)                                # call the function in R
16

Most important changes in V 0.8.x

  • Support for out-of-bound messages (allows for callbacks from R to Python) (contrib. by Philip. A.)
  • Rserve can now be shutdown remotely (contrib. by Uwe Schmitt)
  • Fixed bug when passing R functions as parameters to R functions
  • Documentation errors have been fixed

Documentation and Support

The documentation for pyRserve is available at http://packages.python.org/pyRserve

The corresponding Google news group can be found at http://groups.google.com/group/pyrserve

Read and Post Comments