Re: [Rpy] Rpy and dot names

2011-04-18 Thread Laurent Gautier
Assigning to GlobalEnv does not seem to be required. With rpy2-2.2.0dev, a standalone example can be like: import rpy2.interactive as r r.importr('survcomp') # set up the stage (omitted from earlier code snippet) age = r.packages.stats.rnorm(100, 50, 10) sex = r.packages.base.sample(r.IntVector

Re: [Rpy] Rpy and dot names

2011-04-18 Thread Anamaria Crisan
> > Hello! > > I solved this problem(finally!) and thought I would put up the solution if > anyone was interested. The only thing that's left is converting my output to > a dictionary...which I am still working on. > > Here's what it looked like: > > from numpy import * > from scipy import * > from

Re: [Rpy] Rpy and dot names

2011-04-18 Thread Peter
On Mon, Apr 18, 2011 at 5:24 PM, Anamaria Crisan wrote: > Hi, > I've tried changing the conversion mode as suggested, however it will die at > the  r_result = cindex(x=prob, surv_time=survTIME, surv_even=survEVENT) > line.  I don't know how often R methods have var.name , but if someone else > has

Re: [Rpy] Rpy and dot names

2011-04-18 Thread Anamaria Crisan
O_CONVERSION) >> >> >> >> # YOUR CODE HERE >> >> >> >> r_result = cindex(x=prob, surv_time=survTIME, >> surv_even=survEVENT) >> >> >> >> py_result=result.as_py(rpy.BASIC

Re: [Rpy] Rpy and dot names

2011-04-15 Thread Warnes, Gregory R.
nomedx.com] Sent: Friday, April 15, 2011 12:59 PM To: rpy-list@lists.sourceforge.net Cc: Peter Subject: Re: [Rpy] Rpy and dot names I have one more point I would like to add. When I run all of the code in R, it works just fine. If I make a small python

Re: [Rpy] Rpy and dot names

2011-04-15 Thread Anamaria Crisan
> I have one more point I would like to add. > > When I run all of the code in R, it works just fine. If I make a small > python file with exactly the code I ran in R, it gives me the 'not all > arguments have the same length' error. I will continue to check my code, but > I am suspicious that its

Re: [Rpy] Rpy and dot names

2011-04-15 Thread Peter
On Fri, Apr 15, 2011 at 4:56 PM, Anamaria Crisan wrote: > I am using just Rpy. Would RPy2 be the solution? > Possibly - and in the long term it would be worth looking at, but there are quite a few API changes to beware of. Back in rpy (v1), to run an R command like: cindex(x=prob, surv.time=sur

Re: [Rpy] Rpy and dot names

2011-04-15 Thread Anamaria Crisan
I am using just Rpy. Would RPy2 be the solution? On Fri, Apr 15, 2011 at 2:30 AM, Peter wrote: > On Fri, Apr 15, 2011 at 1:08 AM, Anamaria Crisan wrote: > > Hello, > > I am trying to use RPy to run an R package called survcomp. One of the > > methods takes in the variable name surv.time. For exa

Re: [Rpy] Rpy and dot names

2011-04-15 Thread Peter
On Fri, Apr 15, 2011 at 1:08 AM, Anamaria Crisan wrote: > Hello, > I am trying to use RPy to run an R package called survcomp. One of the > methods takes in the variable name surv.time. For example, I can run it as > follows: > cindex(x=prob,surv.time=survTIME, surv.even=survEVENT) in R (where x,

[Rpy] Rpy and dot names

2011-04-14 Thread Anamaria Crisan
Hello, I am trying to use RPy to run an R package called survcomp. One of the methods takes in the variable name surv.time. For example, I can run it as follows: cindex(x=prob,surv.time=survTIME, surv.even=survEVENT) in R (where x, suvr.time and surv.event are predefined variable names from the p