R/jython.get.R

Defines functions jython.get

Documented in jython.get

#########################################################
# CGB, 20100708, created
#########################################################

jython.get <- function( rJython, py.var ){

    jython.command <- paste( "_r_return = json.dumps( [", py.var, "] )", sep = "" )
    jython.exec( rJython, jython.command )
    ret <- fromJSON( .jstrVal( rJython$get ( "_r_return" )) )
    if( length( ret ) == 1 ) ret <- ret[[1]]
    ret
}

Try the rJython package in your browser

Any scripts or data that you put into this service are public.

rJython documentation built on May 2, 2019, 4:55 p.m.