Re: [R] Problem setting options(error=recover) in my

From: Prof Brian D Ripley <>
Date: Thu 14 Sep 2006 - 16:28:34 GMT

On Thu, 14 Sep 2006, Marcus, Jeffrey wrote:

> I'd like to be able to set options(error=recover) in my file.
> When I do this I get the message
> "Error in options(error = recover) : object "recover" not found
> I assume this is because the utils package (where recover and dump.frames
> are defined) has not been loaded at the time I make this call.
> I suppose I could explicitly do library("utils") before setting the
> "options" even though it will be loaded again when the default packages are
> loaded.

It will not be loaded again.

> Any simpler suggestions of how to get options(error=recover) set
> automatically every time I start R?


> More generally, is there a way to have code executed on startup but *after*
> the default packages are loaded?

Load the default packages yourself in your startup code, by calling .First.sys() (and resetting it to avoid the slight overhead of subsequent require() calls if you want).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri Sep 15 02:32:44 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 14 Sep 2006 - 18:30:05 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.