Hi all, I need some help with R. I am looking for a function that puts R back into a vanilla state (exactly the same when I just started it). Specifically I want all objects in the workspace removed and all non-base packages detached and unloaded; all base packages that are loaded on startup should remain loaded (and preferably a .Rprofile executed as well). It would also be good if all the options would be reset (but that is not strictly necessary). Thank you very much for your help. Best Holger Hoefling [[alternative HTML version deleted]]
On 16/12/10 15:12:47, Holger Hoefling wrote:> Specifically I want all objects in the workspace removedrm(list=ls()) should do this trick.> and all non-base packages detached and unloadedYou 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 wellsource(".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
exit from the current session and startup a new one. On Thu, Dec 16, 2010 at 9:12 AM, Holger Hoefling <hhoeflin at gmail.com> wrote:> Hi all, > > I need some help with R. I am looking for a function that puts R back into a > vanilla state (exactly the same when I just started it). Specifically I want > all objects in the workspace removed and all non-base packages detached and > unloaded; all base packages that are loaded on startup should remain loaded > (and preferably a .Rprofile executed as well). It would also be good if all > the options would be reset (but that is not strictly necessary). > > Thank you very much for your help. > > Best > > Holger Hoefling > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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. >-- Jim Holtman Data Munger Guru What is the problem that you are trying to solve?
On Dec 16, 2010, at 10:01 AM, jim holtman wrote:> exit from the current session and startup a new one.Possibly with an additional step of deleting .Rdata from the working directory.> > On Thu, Dec 16, 2010 at 9:12 AM, Holger Hoefling > <hhoeflin at gmail.com> wrote: >> Hi all, >> >> I need some help with R. I am looking for a function that puts R >> back into a >> vanilla state (exactly the same when I just started it). >> Specifically I want >> all objects in the workspace removed and all non-base packages >> detached and >> unloaded; all base packages that are loaded on startup should >> remain loaded >> (and preferably a .Rprofile executed as well). It would also be >> good if all >> the options would be reset (but that is not strictly necessary). >> >> Thank you very much for your help. >> >> Best >> >> Holger Hoefling >> > > -- > Jim Holtman > Data Munger GuruDavid Winsemius, MD West Hartford, CT
Apparently Analagous Threads
- Different serialization of functions in interactive vs. batch mode
- Advice debugging M1Mac check errors
- Different serialization of functions in interactive vs. batch mode
- HTML help -- as a single document for the entire package
- HTML help -- as a single document for the entire package