Hi list,

I'm working on an application in which I'd like to use RPy2 to port a
large amount of data from Python to R for analysis.  However, I'm not
sure how to accomplish this without creating a growing process.  As an
example, the following script is crashing with a "MemoryError" on my box
after about 10 iterations.  I'm running Windows XP SP2, Python 2.5.2, R
2.8.1 and RPy2 2.0.3.  Is this due to a memory leak, or is there another
way to delete the R/Python objects that seem to be accumulating?

Thanks for your help,
John

from rpy2 import robjects
import gc   
i = 0 
while True:
    print(i)
    i += 1
    robjects.globalEnv['x'] = robjects.FloatVector(range(10000000))
    robjects.r('rm(x)')
    gc.collect()

------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to