[Piuparts-devel] Bug#705847: python-rpy fails to import
Dave Steele
dsteele at gmail.com
Sat Apr 20 22:38:27 UTC 2013
On Sat, Apr 20, 2013 at 6:10 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 20 April 2013 at 17:27, Dave Steele wrote:
...
>
> I was a little afraid of this. RPy has _long_ been dead. I even patched it
> for (IIRC) R 2.10 when the original version regexp could not deal with two digits.
>
> Could you spend some time on it? I don't personally use it, and as we have
> RPy2 actively maintained, would otherwise suggest to just drop it...
python-rpy has 2 reverse dependencies. It looks like the best thing to
do is to port piuparts-report charting [1] to rpy2. I tried a quick
hail mary pass at directly replacing rpy with rpy2.rpy_classic - any
command I try parses like this:
$ python
Python 2.7.3 (default, Mar 4 2013, 14:57:34)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rpy2.rpy_classic import *
>>> r('t <- (read.table("counts.txt",sep=",",header=1,row.names=1))')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/rpy2/rpy_classic.py", line
283, in __call__
return self.eval(self.parse(text=s))
File "/usr/lib/python2.7/dist-packages/rpy2/rpy_classic.py", line
272, in __getattr__
res = self.__getitem__(name)
File "/usr/lib/python2.7/dist-packages/rpy2/rpy_classic.py", line
279, in __getitem__
res = rpy2py(res)
File "/usr/lib/python2.7/dist-packages/rpy2/rpy_classic.py", line
186, in rpy2py
raise ValueError("Invalid default mode.")
ValueError: Invalid default mode.
Can you provide some pointers to an R neophyte on how to proceed?
1 - https://github.com/davesteele/piuparts/blob/develop/piuparts-report.py#L1062
More information about the Piuparts-devel
mailing list