Last data update: 2014.03.03

R: jython.method.call
jython.method.callR Documentation

jython.method.call

Description

Calls Python functions from R

Usage

  jython.method.call( rJython, py.object, py.method, ... )

Arguments

rJython

rJython interpreter as instantiated by function rJython

py.object

an existing object

py.method

a method of such object

...

arguments for the method

Details

This function runs a python function taking as arguments R objects and returning an R object. Some limitations exist as to the nature of the objects that can be passed between R and Jython. As of this writing, atomic arguments and vectors are supported.

The user has to be careful to indicate named parameters as required according to python conventions.

Value

An R representation of the object returned by the call to the python function.

References

http://code.google.com/p/simplejson

Examples


rJython <- rJython()

rJython$exec( 'a = "hola hola"' )
jython.method.call( rJython, "a", "split", " " )

Results