I managed to ask our Systems Administrator to install a new version of R. I know have R2.10.0 installed but rpy2 is still not very happy with it.
When I try to import robjects I get the following errors: Python 2.5.2 (r252:60911, Jan 4 2009, 21:59:32) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import rpy2.robjects Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/applications/R-2.10.0/library/methods/libs/methods.so': /applications/R-2.10.0/library/methods/libs/methods.so: undefined symbol: Rf_allocS4Object Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/applications/R-2.10.0/library/grDevices/libs/grDevices.so': /applications/R-2.10.0/library/grDevices/libs/grDevices.so: undefined symbol: R_ClassSymbol In addition: Warning message: package "methods" in options("defaultPackages") was not found Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/applications/R-2.10.0/library/grDevices/libs/grDevices.so': /applications/R-2.10.0/library/grDevices/libs/grDevices.so: undefined symbol: R_ClassSymbol In addition: Warning message: package grDevices in options("defaultPackages") was not found Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/applications/R-2.10.0/library/grDevices/libs/grDevices.so': /applications/R-2.10.0/library/grDevices/libs/grDevices.so: undefined symbol: R_ClassSymbol In addition: Warning message: package graphics in options("defaultPackages") was not found Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/applications/R-2.10.0/library/methods/libs/methods.so': /applications/R-2.10.0/library/methods/libs/methods.so: undefined symbol: Rf_allocS4Object In addition: Warning message: package stats in options("defaultPackages") was not found During startup - Warning message: package methods in options("defaultPackages") was not found I checked the path for the files and they are there. I even tried with write permissions but I get the same error. Is this a but with rpy2? Many thanks, Bruno 2009/12/7 Laurent Gautier <lgaut...@gmail.com> rpy2 will be happier with R >= 2.8 (as bugs in R were fixed) L. On 12/7/09 12:33 PM, B.A.D.C.M.D Santos wrote: The problem is that I get the error when import robjects. When I tried to replicate your instructions I got the following error: In [5]: print(rpy2.robjects.r['search']()) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /export/home/bacms2/<ipython console> in <module>() /usr/lib/python2.5/site-packages/rpy2/robjects/__init__.pyc in __str__(self) 125 tmp = baseNameSpaceEnv["fifo"]("") 126 baseNameSpaceEnv["sink"](tmp) --> 127 r.show(self) 128 baseNameSpaceEnv["sink"]() 129 if sys.platform == 'win32': /usr/lib/python2.5/site-packages/rpy2/robjects/__init__.pyc in __getattribute__(self, attr) 511 return self[attr] 512 except LookupError, le: --> 513 raise orig_ae 514 515 def __getitem__(self, item): AttributeError: 'R' object has no attribute 'show' I am using the following versions: R version 2.7.1 (2008-06-23) Python 2.5.2 (r252:60911, Jan 4 2009, 21:59:32) rpy2 version 2.0.8 Many Thanks, Bruno 2009/12/7 Laurent Gautier <lgaut...@gmail.com> phyper is part of "stats", which should be loaded by defaults. Check what returns: print(robjects.r["search"]()) If not attached, you'll have to load it. L. PS: The R version, Python version, and rpy2 version is generally a good thing to tell us. On 12/7/09 11:06 AM, B.A.D.C.M.D Santos wrote: I am getting an error when using rpy2 under a Debian operating system. It seems to be some kind of problem with R_LIBS enviromental variable but I cannot get it completly. Can someone please explain me better the problem so I can try to fix. I have tried to export a varible R_LIBS but the problem persist. Here is the detailed information: run phasingBinomial.py xp 0.002 21 11 Error in strsplit(Sys.getenv("R_LIBS"), ":") : 5 arguments passed to .Internal(strsplit) which requires 6 Error in strsplit(x[ok], "[.-]") : 5 arguments passed to .Internal(strsplit) which requires 6 Error in strsplit(x[ok], "[.-]") : 5 arguments passed to .Internal(strsplit) which requires 6 . . . Error in eval(expr, envir, enclos) : object 'phyper' not found --------------------------------------------------------------------------- RRuntimeError Traceback (most recent call last) /export/home/bacms2/AtillaChlamy/phasingBinomial.py in<module>() 236 for signature in dtSignatures.values(): 237 #Defines the loci object --> 238 loc = loci(nWindow*2,nSize) 239 #Test if read is on the Watson strand 240 if signature.nStrand == 1: /export/home/bacms2/AtillaChlamy/phasingBinomial.py in __init__(self, length, nSize) 112 self.__aux_ls__ = [] 113 self.__printValue__ = False --> 114 self.phyper = robjects.r('phyper') 115 116 def addRead(self,name,pos=0): /usr/lib/python2.5/site-packages/rpy2/robjects/__init__.pyc in __call__(self, string) 534 def __call__(self, string): 535 p = self.parse(text=string) --> 536 res = self.eval(p) 537 return res 538 /usr/lib/python2.5/site-packages/rpy2/robjects/__init__.pyc in __call__(self, *args, **kwargs) 421 for k, v in kwargs.iteritems(): 422 new_kwargs[k] = conversion.py2ri(v) --> 423 res = super(RFunction, self).__call__(*new_args, **new_kwargs) 424 res = conversion.ri2py(res) 425 return res RRuntimeError: Error in eval(expr, envir, enclos) : object 'phyper' not found WARNING: Failure executing file:<phasingBinomial.py> ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list