On Sat, Apr 24, 2010 at 12:54 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote: > Well, this has seriously gotten off the original topic. > > While Hadley makes some sense, it is nevertheless > sometimes the case (surely so for David, I would surmise) > that one is putting together a response to an R-help > query when a new query prompts one to temporarily abandon > the first and formulate a response to the second. One > may well prefer not to have one's workspace cleared even > though this would not lose more than the temporarily > suspended work. So, is ther *ever* a good reason to > *not* put rm(list=ls()) behind a comment char? I doubt it.
Is there ever a good idea to use rm(list = ls()) ? Why not close R and restart it so you can guarantee you have a clean environment which with to test your code. This is probably one of the biggest disadvantages of using the existing R guis - you normally only have one running, and it's a hassle to close it down and restart it. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ ______________________________________________ R-help@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.