Reset R to a vanilla state
On 16/12/10 15:12:47, Holger Hoefling wrote:
Specifically I want all objects in the workspace removed
rm(list=ls()) should do this trick.
and all non-base packages detached and unloaded
You may obtain the list of loaded packages via (.packages()) Store this at the beginning of your session, get the diff to the loaded packages at the end of the session and detach(package:packagename) those packages.
and preferably a .Rprofile executed as well
source(".Rprofile") ?
What's the circumstance that requires you to do this? I.e. why don't you
just restart R?
Regards,
Georg.
--
Research Assistant
Otto-von-Guericke-Universit?t Magdeburg
research at georgruss.de
http://research.georgruss.de