R/pithon.get.R

Defines functions pithon.get

Documented in pithon.get

# Code from rPython 0.0-5, by Carlos J. Gil Bellosta
# Small modifications by Jori Liesenborgs

pithon.get <- function(var.name, instance.name = "" ){

    ret <- .C( "py_get_var", var.name, instance.name, found = integer(1), result = character(1), PACKAGE = "rPithon" )

    if(!ret$found)
        stop(paste("Couldn't retrieve variable: ", ret$result, sep=""))
        
    ret <- fromJSON(ret$result)

    if( length( ret ) == 1 ) ret <- ret[[1]]
    ret
}

Try the rPithon package in your browser

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

rPithon documentation built on May 2, 2019, 5:51 p.m.