An object of type Robj
has three methods:
as_py([mode])
Robj
object to a
classical Python object, whenever possible. If it is not possible,
the same object is returned. The optional parameter is the mode from
which to apply the conversion, see Modes. The default value
for this parameter is the global mode (see R to Python).
autoconvert([mode])
local_mode([mode])
NO_DEFAULT
,
(see Python to R). When no argument is passed to this method, it
displays the current local conversion mode of the object. (The two
names are synonym for compatibility with version 0.1.)
lcall([argument list])
For example:
>>> r.seq.local_mode(NO_CONVERSION) >>> a = r.seq(3, 5) >>> a <Robj object at 0x814c2e8> >>> a.as_py() [3, 4, 5] >>> set_default_mode(NO_CONVERSION) >>> r.print_(r.c.lcall( (('',0),('a',1),('b',2),('c',3)) ) ) a c b 0 1 3 2 <Robj object at 0xbc89d0> >>> set_default_mode(BASIC_CONVERSION)