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 <[email protected]>
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list