Hello all,
I have a number of analyses that call bunches of sub-scripts, and in the
end, I get the "maximal number of DLLs reached" error. This has been
asked before (e.g.
http://stackoverflow.com/questions/36974206/r-maximal-number-of-dlls-reached),
and the general answer is, "just clean up after yourself".
Assuming there are no plans to raise this 100-DLL limit in the near
future, my question becomes, what is best practice for cleaning up
(detaching) loaded packages in scripts, when those scripts are sometimes
called from other scripts? One can detach all packages at the end of a
script that were loaded at the beginning of the script. However, if a
package is required in a calling script, one should really make sure it
hadn't been loaded prior to sub-script invocation before detaching it.
I could write a custom function that pushes and pops package names from
a global list, in order to keep track, but maybe there's a better way
out there...
Thanks for any thoughts.
Allie
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.