Skip to content
Back to formatted view

Raw Message

Message-ID: <4A236849.5010202@stats.uwo.ca>
Date: 2009-06-01T05:34:01Z
From: Duncan Murdoch
Subject: 'options=utils::recover' not working in .Rprofile or within R
In-Reply-To: <9C499746-19C6-41E4-988F-66CF62265ADF@comcast.net>

David Winsemius wrote:
> On May 31, 2009, at 12:22 AM, Duncan Murdoch wrote:
>
>   
>> David Winsemius wrote:
>>     
>>> You are wiping out all of the default options with that approach.
>>>
>>>
>>>       
>> Actually, I think it hid the options() function.
>>     
>
> Since I was doing this at the RGui and became concerned that it  
> appeared I no longer had any options, I restarted.  Could I have saved  
> time by just executing rm(options)?
>   

Yes.
>   
>>> Try (after restarting R to get the other options back to what they   
>>> should be):
>>>
>>> op=options()                   # so you can reset back to baseline
>>> options(error=utils::recover)  # do not think the "utils::" is needed
>>>
>>>       
>> Not if you run it in the console, but it is needed in .Rprofile.
>>     
>
> Because it might be executed before the loading of the default packages?
>   
I think ?Startup documents it to do just that.  I didn't check the 
actual source or test it, but usually the docs are right, even if 
sometimes they aren't.

Duncan Murdoch