[Piuparts-devel] Bug#705847: python-rpy fails to import

Dirk Eddelbuettel edd at debian.org
Sat Apr 20 23:28:58 UTC 2013


On 20 April 2013 at 18:38, Dave Steele wrote:
| 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

Good thinking.  Actually three in unstable it seems:
  pyspread,python-rpy 1.0.3
  python-mvpa,python-rpy
  piuparts-master,python-rpy

But it is only a Recommend for pyspread and a Suggests for python-mvpa

| 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?

I can help you _a lot_ with R, but I know very little Python. And in my
Python I never use R.

But I am sure that the rpy-list can be of help.

Dirk
 
| 1 - https://github.com/davesteele/piuparts/blob/develop/piuparts-report.py#L1062

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the Piuparts-devel mailing list