The conversion from Python objects to R objects is automatic.
It is done when passing parameters in
Robj objects. Normal
Python objects are converted to R objects according to the table
given in Basic conversion. A
Robj object is converted to
the R reference which it represents.
In addition, every Python object which defines a
method, is converted to R as the result of calling that method.
If none of this apply, an exception is raised.
>>> class Foo: ... def as_r(self): ... return 5 ... >>> a = Foo() >>> dummy = r.print_(a)  5 >>> >>> r.print_(range) Traceback (most recent call last): File "<stdin>", line 1, in ? rpy.RException: cannot convert from type 'builtin_function_or_method'