On 2010-04-24 13:50, hadley wickham wrote:
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.
I agree completely. It's precisely what I do. The only
drawback might be restarting a number of packages but even
that hasn't been a problem. I don't think I've used rm(list=ls())
in any session other than one I don't mind losing.
-Peter
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
--
Peter Ehlers
University of Calgary
______________________________________________
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.