[R] S4 Methods with large numbers of args using memory

From: Joseph Wang <joe_at_gnacademy.org>
Date: Wed 07 Jun 2006 - 11:51:57 EST

Thanks all to the people on the r-help list for the backtick help.

I've run into another problem. With my SWIG C++ wrapper for R, I'm finding that S4 generic functions with large numbers of argument (such as 10 or 11) seem to be taking up a lot of memory especially when a lot of the arguments are set to missing.

This happens because I'm generating S4 methods to wrapper C++ functions with optional arguments. Each wrapper can take several meg of heap causing my R program to quickly run out of heap memory.

Any ideas as to what the problem is and any possible way of working around it?

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 07 11:56:54 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 07 Jun 2006 - 12:10:36 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.