Re: [Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-19 Thread Gregory Warnes
Hi Michael, The trick here is that r['...'] expects the ... to be an object name, rather than a statement to be executed. The brackets following the name 'r' is shorthand for 'obtain the object named ... from r', which can also be expressed as, r.get('...') RPy provides a similar s

Re: [Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-19 Thread Michael Grollman
Greg / Kevin, Thanks, each of the solution's works. Much appreciated. This one appears to need a minor tweak, from: import rpy rpy.r.library("pwr") rpy.r.pwr_p_test(h=0.2,power=0.95,sig.level=0.05) to ... sig_level=0.05... Which makes sense, given Greg's explanation

Re: [Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-18 Thread Kevin J. Thompson
this hsould work: r.library('pwr') r.pwr_p_test(h=0.2,power=0.95,sig_level=0.05) kevin I am a new user of RPy, just having completed a build of it on Debian Etch using 1.0-RC1 and R-2.51. All seems to be running fine on the R side and the RPY side, but I am struggling a bit with syntax for pa

Re: [Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-17 Thread Gregory Warnes
The normal way to make the call to an r function using rpy is to call it like so: import rpy rpy.r.function_name(a=1, b=2, c=4) note that in R, the period character '.' is a valid part of names, while in python it is not. To overcome this problem, rpy translates the under

[Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-17 Thread mgrollman
I am a new user of RPy, just having completed a build of it on Debian Etch using 1.0-RC1 and R-2.51. All seems to be running fine on the R side and the RPY side, but I am struggling a bit with syntax for parameters passing, and I am not able to find a question on the mailing list to assist.