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

pyRserve 0.6.0 released

July 04, 2012 at 07:20 PM | categories: Python, R | View Comments

While being at EuroPython in Florence the latest version of pyRserve has now been finished and is available via pypi (easy_install -U pyRserve). If you are at EuroPython, too, and want to talk about it just come and see me.

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 called remotely. No R-related libraries need to be installed on the client side.

Sample code

>>> import pyRserve
>>> conn = pyRserve.connect('servername.domain.com')
>>> conn.r('1+1')                # direct evaluation of a statement in R
2
>>> conn.r.myList = [1, 2, 3]    # bind a Python list in R to variable 'myList'

>>> conn.r('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.6.0

  • Support for Python 3.x (therefore dropped support for Python <= 2.5)
  • Support for unicode strings
  • Suport for Fortran-style ordering of numpy arrays
  • Elements of single-item arrays are now translated to native python data types
  • Full support complex numbers, partial support for 64bit integers and arrays

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

pyRserve 0.5.2 released

December 06, 2011 at 08:22 PM | categories: Python, R | View Comments

The latest version is now available via pypi (easy_install -U pyRserve).

About pyRserve

pyRserve is a (pure python) client for connecting Python to an R process on a remote server via TCP-IP (using Rserve). Through such a connection variables can be get and set in R from Python, and also R-functions can be called remotely. No R-related libraries need to be installed on the client side.

Sample code

>>> from pyRserve import connect
>>> conn = connect('your R server')
>>> conn.r('1+1')                # direct evaluation of a statement
2
>>> conn.r.myList = [1, 2, 3]    # bind a list within R to variable 'myList'

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

Changes in V 0.5.2

  • Fixed bug with 32bit integer conversion on 64bit machines. Upgrade highly recommended!

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

pyRserve 0.5.0 released

October 12, 2011 at 03:22 PM | categories: Python, R | View Comments

The latest version is now available via pypi (easy_install -U pyRserve).

About pyRserve

pyRServe is a library for connecting Python to an R process running under Rserve. Through such a connection variables can be get and set in R from Python, and also R-functions can be called remotely.

Changes in V 0.5.0

  • Renamed pyRserve.rconnect() to pyRserve.connect(). The former still works but shows a DeprecationWarning
  • String evaluation should now only be executed on the namespace directly, not on the connection object anymore. The latter still works but shows a DeprecationWarning.
  • New kw argument atomicArray=True added to pyRserve.connect() for preventing single valued arrays from being converted into atomic python data types.

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