[R] Memory allocation problem
Jamie Ledingham
jamie.ledingham at newcastle.ac.uk
Tue Aug 12 16:16:13 CEST 2008
Dear R users,
I am running a large loop over about 400 files. To outline generally,
the code reads in the initial data file, then uses lookup text files to
obtain more information before connecting to a SQL database using RODBC
and extracting more data. Finally all this is polar plotted.
My problem is that when the loop gets through 170 odd files it gives the
error message:
"Calloc could not allocate (263168 of 1) memory"
I have increased the memory using memory.limit to the maximum amount.
I strongly suspect that R is holding data temporarily and that this
becomes too much to handle by the time the loop reaches 170. Has anyone
had any experience of this problem before? Is it possible to 'wipe' R's
memory at the end of each loop - all results are plotted and saved or
written to text file at the end of each loop so this may be the ideal
solution.
Thanks
Jamie Ledingham
More information about the R-help
mailing list