python - Import rpy2.robjects gives error -
I have a data that has 10 million records, I have an R code in which the coefficient of a model using 3000 graphs Need to guess. Running an R code on this data takes a lot of time and sometimes my system is hanging. I'm using the Windows 8.1-64 bit version with 4GB RAM to reduce the time, I want to integrate R with Python. Although I have medium knowledge in R, but I am completely new in Python. I came to know that rpy2 can be used to call RAd from Python (I have Python version 3.4.1).
As the robjects
import rpy2
import rpy2.robjects but giving the following error: I have done the following
Traceback (most recent call last): file "C: \ Python34 \ lib \ site-package \ rpy2 \ rinterface__init __ py.", In line 29, 0, win32con.KEY_QUERY_VALUE) pywintypes.error: (2, 'RegOpenKeyEx' '
Traceback (most recent call final): File "", line 1, import into rpy2.robjects as file "C: \ Python34 \ lib \ site-package \ rpy2 \ robjects__init __ py. ", Line 15, rinterface file" import as r in rpy2.rinterface: \ Python34 \ lib \ s Note: In the ImportError (i.e.), the line-package \ rpy2 \ rinterface__init __ py ", line 32, is:. NameError: the name 'ie' is not defined
I can not understand why I am getting the error. How to remove it?
But if I do the following, its work:
rpy2 import * to
It would be helpful if someone Explains how to call Python broadly and solve my problem. In less time, any other solution about running large data in R will also be appreciated. thank you in advanced!
with Python 2.7 and R3.1.1 Faced with the same problem running in Win7 x64 1) Install pywin32: I still have the "import time" temporary file Unable to unlink, but I was able to complete some of the demos given here:
2) Add environmental variable R_HOME: [path for R, /Rx.x/bin]
Comments
Post a Comment