Re: [Rpy] memory leak?

2008-11-21 Thread Laurent Gautier
Using Python's gc module ( gc.collect() ) I seem to manage a forced collection of the R objects accumulating mysteriously otherwise. I am now reaching iteration 4594 of your example, with a memory footprint still oscillating between 40 and 60 Mb. Laurent laurent oget wrote: > I have been a

Re: [Rpy] memory leak?

2008-11-21 Thread Laurent Gautier
When rebuilding rpy2 after commenting out line 106 in setup.py: define_macros.append(('RPY_DEBUG_PRESERVE', 1)) I can see that it seems that R objects are preserved but not released until the termination of the python process. In fact during each iteration I have 6 R objects preserved, but only 4

Re: [Rpy] memory leak?

2008-11-21 Thread laurent oget
I have been able to improve the leak considerably with your suggestion and also attaching the dataFrame instead of passing it as an argument of lm every time. As an added benefit this reduces the number of copy, which increases performance. It is still leaking, though Laurent 2008/11/21 Laure

Re: [Rpy] memory leak?

2008-11-21 Thread Laurent Gautier
laurent oget wrote: > is there something i can do to prevent the following script from leaking > memory? There seems to be something happening. (more below) > Laurent > > from rpy2.robjects import r,RVector,RDataFrame > from rpy2.rlike.container import TaggedList > from math import sin > impor

Re: [Rpy] uniroot, and r.function()

2008-11-21 Thread Warnes, Gregory R.
Use fun = r(" function(x) { x+1 }") -G - Original Message - From: Antonio Garcia-Martinez <[EMAIL PROTECTED]> To: rpy-list@lists.sourceforge.net Sent: Thu Nov 20 23:35:25 2008 Subject: [Rpy] uniroot, and r.function() I'm trying to use R's uniroot function from within python. The first