Description Usage Arguments Details Value References Examples
Executes python code via the Jython interpreter
1 | jython.exec( rJython, python.code )
|
rJython |
rJython interpreter as instantiated by function |
python.code |
a character vector containing python code, typically containing a single line with indentation and EOL characters as required by Python syntax |
This function runs Python code. It needs to be provided by the caller in a character vector.
The vector may consists of a single string with EOL and indentation characters embedded.
Alternatively, it can be a character vector, each entry containing one or more lines of python code.
None. If the code produces some output, it is up to the caller to go and fetch if from Jython.
http://code.google.com/p/simplejson
1 2 3 4 5 6 | rJython <- rJython()
a <- 1:4
b <- 5:8
jython.exec( rJython, c( "def concat(a,b):", "\treturn a+b" ) )
jython.call( rJython, "concat", a, b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.