Node:Methods of Robj type, Next:Sequence protocol, Previous:Calling R objects, Up:Robj type
An object of type Robj
has two 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.)
For example:
>>> r.seq.local_mode(NO_CONVERSION) >>> a = r.seq(3, 5) >>> a <Robj object at 0x814c2e8> >>> a.as_py() [3, 4, 5]