[R] Intersection for two curves

Peter Ehlers ehlers at ucalgary.ca
Sun Apr 25 00:50:39 CEST 2010


On 2010-04-24 13:50, hadley wickham wrote:
> On Sat, Apr 24, 2010 at 12:54 PM, Peter Ehlers<ehlers at 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



More information about the R-help mailing list