Marcus, Jeffrey
2006-Sep-14 14:48 UTC
[R] Problem setting options(error=recover) in my Rprofile.site
I'd like to be able to set options(error=recover) in my Rprofile.site 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. 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? Thanks. Jeff
Prof Brian D Ripley
2006-Sep-14 16:28 UTC
[R] Problem setting options(error=recover) in my Rprofile.site
On Thu, 14 Sep 2006, Marcus, Jeffrey wrote:> I'd like to be able to set options(error=recover) in my Rprofile.site 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?options(error=utils::recover)> 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, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Possibly Parallel Threads
- options(error=recover) in .Rprofile
- 'options=utils::recover' not working in .Rprofile or within R
- Exit status of Rscript when setting options(error=utils::recover)
- Exit status of Rscript when setting options(error=utils::recover)
- Exit status of Rscript when setting options(error=utils::recover)