[Rd] saving errors/warnings (conditions)

From: Roger D. Peng <rpeng_at_jhsph.edu>
Date: Thu 24 Mar 2005 - 18:14:20 GMT


I recently ran a script which fit many different models (thousands, say) via glm(), some of which were successful and some not. For the unsuccessful fits, I caught them using tryCatch() and returned either a "simpleError" object or a "simpleWarning" object, depending on whether it was an error or a warning that triggered the tryCatch.

I stored all the results in a single big list and I was surprised to see that the memory usage was nearly a 1 GB, but calling object.size() on the results list only returned about 5 MB (I only store two numbers from each fitted model object). When I saved the results list the compressed workspace file was ~90MB.

The only thing I'd done differently from previous runs is store the error/warning objects. Is there some environment that is being saved with a simpleError/Warning object that could be taking up all the memory? I couldn't find any indication on the help page for tryCatch().

Thanks,

-roger
--

Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Mar 25 05:16:53 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:26:32 GMT