[pymvpa] RPy and ENET

Tara Gilliam tg at cs.york.ac.uk
Mon Dec 21 17:02:20 UTC 2009


Hello,

When I try to import the ENET classifier, I get an dependency error about rpy 
being unavailable (PyMVPA version 0.4.3).

I can 'import rpy2', but not 'import rpy' - is it definitely the original RPy 
that is required, or will RPy2 also work? The system I am on is 
university-administered with RPy2 installed, and rpy does not work with our 
current version of R. So if possible I would prefer not having to install a lot 
of (unsupported) dependencies for just this classifier item.

Looking further, the segment of code seems to be this (clfs/enet.py, lines 18-22):

# do conditional to be able to build module reference
if externals.exists('rpy', raiseException=True) and \
    externals.exists('elasticnet', raiseException=True):
     import rpy
     rpy.r.library('elasticnet')


 From the Rpy2 documentation, there seems to be a sort of Rpy-compatible mode:
from http://rpy.sourceforge.net/rpy2/doc/html/rpy_classic.html, allowing e.g.

import rpy2.rpy_classic as rpy
rpy.r.library('splines')

Do you know of any (e.g. version-specific) issue that would prevent a local 
patch to the import statement from working here? Are there any plans to switch 
PyMVPA to RPy2?

Many thanks,
Tara




More information about the Pkg-ExpPsy-PyMVPA mailing list