Conversion error when ipython extension loaded and assigning an object into an R environment

Issue #207 resolved
Laurent Gautier created an issue
In [1]: %load_ext rpy2.ipython

In [2]: import rpy2.robjects as ro

In [3]: dataf = ro.DataFrame({'x': 1})

In [4]: ro.r['summary'](dataf)
Out[4]: 
<Matrix - Python:0x7f6d5a39d440 / R:0x3190208>
['Min...., '1st ..., 'Medi..., 'Mean..., '3rd ..., 'Max....]

In [5]: ro.globalenv['x'] = dataf
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-40100d5047f5> in <module>()
----> 1 ro.globalenv['x'] = dataf

/home/laurent/Desktop/software/python/py33_env/lib/python3.3/site-packages/rpy2-2.4.1-py3.3-linux-x86_64.egg/rpy2/robjects/environments.py in __setitem__(self, item, value)
     30     def __setitem__(self, item, value):
     31         robj = conversion.py2ro(value)
---> 32         super(Environment, self).__setitem__(item, robj)
     33 
     34     def get(self, item, wantfun = False):

ValueError: All parameters must be of type Sexp_Type.

Comments (2)

  1. Log in to comment