[R] Calling R functions from Python
ryan at rstatx.com
ryan at rstatx.com
Fri Jan 9 18:26:31 CET 2009
All-
Thanks in advance for your help.
I'm trying to call R function using Python in a windows environment and have
downloaded the Rpy library however it doesn't appear to work with R 2.7.2.
Does anyone know if a new version of Rpy exists for windows that will work
with R and where it can be downloaded from?
Here's an example of the error I'm getting:
Traceback (most recent call last):
File "C:\Documents and Settings\rkirkish\Desktop\test.py", line 1, in
<module>
from rpy import r
File "C:\Python25\Lib\site-packages\rpy.py", line 134, in <module>
""" % RVERSION)
RuntimeError: No module named _rpy2072
RPy module can not be imported. Please check if your rpy
installation supports R 2.7.2. If you have multiple R versions
installed, you may need to set RHOME before importing rpy. For
example:
>>> from rpy_options import set_options
>>> set_options(RHOME='c:/progra~1/r/rw2011/')
>>> from rpy import *
More information about the R-help
mailing list