Support Requests item #2837777, was opened at 2009-08-14 19:12
Message generated for change (Settings changed) made by lgautier
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=453022&aid=2837777&group_id=48422
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: lgautier (lgautier)
Summary: rpy2 not returning result, but an object instead
Initial Comment:
When I run a command to R through rpy2 I receive the following:
>>> robjects.r['ls']
<RFunction - Python:0x00C46738 / R:0x011FBEB4>
Shouldn't the result print a listing of files?
str(robjects.r['ls']) lists the R function
>>> robjects.r['pi']
<RVector - Python:0x00C4D238 / R:0x01120CC8>
I understood from the documentation the result should be the actual number PI
str(robjects.r['pi']) prints [1] 3.141593
What is happening and how can I fix this? It is affecting ManageR in Quantum so
that no results ever print because it is seen as empty.
Thanks!
Philip
----------------------------------------------------------------------
>Comment By: lgautier (lgautier)
Date: 2009-08-23 19:28
Message:
Please post questions to the mailing-list.
robjects.r['pi'] is a vector.
Check it with:
tuple(robjects.r['pi'])
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2009-08-20 00:00
Message:
I get a similar result:
>>> import rpy2.robjects as robjects
>>> robjects.r['pi']
<RVector - Python:0x00C5F710 / R:0x017D8528>
>>> robjects.r('pi')
<RVector - Python:0x00C59440 / R:0x017D8528>
>>> robjects.r('''
f<- function(r) {2* pi* r}
f(3)
''')
<RVector - Python:0x0117F3C8 / R:0x017BDEE8>
I just installed rpy2 today, using the installer for Python2.5/win32
contributed by Chuck White provided on SourceForge.
My setup:
Python 2.5
RPy 2.0.6
R 2.9.1
Windows XP SP3
Any suggestions?
~ April
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=453022&aid=2837777&group_id=48422
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list