[Rpy] uniroot, and r.function()

2008-11-20 Thread Antonio Garcia-Martinez
I'm trying to use R's uniroot function from within python. The first arg is a function, but I'm having trouble creating a function inside python using r.function(). For example, a naive attempt: >>> r.function( "x", "x+1" ) Traceback (most recent call last): File "", line 1, in rpy.RPy_RExc

Re: [Rpy] Could I be taken of the list please?

2008-11-20 Thread Peter
On Thu, Nov 20, 2008 at 6:12 PM, Javier Alfaro <[EMAIL PROTECTED]> wrote: > > Hello, > Hate to bother you but do you think I could de-register from this list? > Thanks > -- > Javier A. Alfaro Hi Javier, You should be able to do this yourself. At the end of every email sent via the list is a URL,

[Rpy] memory leak?

2008-11-20 Thread laurent oget
is there something i can do to prevent the following script from leaking memory? Laurent from rpy2.robjects import r,RVector,RDataFrame from rpy2.rlike.container import TaggedList from math import sin import array size=100 xx=[] for x in range(size): xx.append(RVector(array.array('f',[sin(0.

[Rpy] SF.net SVN: rpy:[698] rpy2/branches/version_2.0.x

2008-11-20 Thread lgautier
Revision: 698 http://rpy.svn.sourceforge.net/rpy/?rev=698&view=rev Author: lgautier Date: 2008-11-20 20:31:49 + (Thu, 20 Nov 2008) Log Message: --- Fixed error error message when R is not in the PATH (either at build time or at run time) Modified Paths: --

[Rpy] Could I be taken of the list please?

2008-11-20 Thread Javier Alfaro
Hello, Hate to bother you but do you think I could de-register from this list? Thanks -- Javier A. Alfaro - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applicatio

Re: [Rpy] problem function call

2008-11-20 Thread Laurent Gautier
I does look like the python function garch given in the example is mixing up few things, and that var_r in by definition in that very function not a data.frame. L. PS: Isnt't "fGarch" for teaching computational finance ? laurent oget wrote: > I do not know garchfit, but it looks to me like i

Re: [Rpy] problem function call

2008-11-20 Thread laurent oget
I do not know garchfit, but it looks to me like it is expecting data to be a data frame, and you are setting a vector. since you are setting both variable in the global evironment, wouldn't it work without the data argument? Laurent 2008/11/20 Degraeve, Frederic <[EMAIL PROTECTED]>: > Hello, > >

[Rpy] problem function call

2008-11-20 Thread Degraeve, Frederic
Hello, I am trying to make the following code work. import rpy2.robjects as robjects r = robjects.r r.library("fGarch") def garch(p, q): robjects.globalEnv["var_r"] = robjects.FloatVector([4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,

Re: [Rpy] [PATCH] passing numpy arrays to rpy2 functions

2008-11-20 Thread Laurent Gautier
Peter wrote: > On Thu, Nov 20, 2008 at 12:02 AM, Nathaniel Smith <[EMAIL PROTECTED]> wrote: > >> In particular, looking at Rinternals.h, VECTOR_ELT etc. are defined in >> terms of calculating direct memory offsets from an SEXPREC. Not only >> are there no strides (necessary for column-major R t

Re: [Rpy] [PATCH] passing numpy arrays to rpy2 functions

2008-11-20 Thread Peter
On Thu, Nov 20, 2008 at 12:02 AM, Nathaniel Smith <[EMAIL PROTECTED]> wrote: > > In particular, looking at Rinternals.h, VECTOR_ELT etc. are defined in > terms of calculating direct memory offsets from an SEXPREC. Not only > are there no strides (necessary for column-major R to grok row-major > Nu