[R] Conflict in .Rprofile documentation FAQ vs. Help?

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 15 18:49:29 CET 2007

On Mon, 15 Jan 2007, MHH Stevens wrote:

> Hi folks,
> I note that in the general FAQ's we have
> 7.25 Why did my .Rprofile stop working when I updated R?
> Did you read the NEWS file? For functions that are not in the base
> package you need to specify the correct package namespace, since the
> code will be run before the packages are loaded. E.g.,
>      ps.options(horizontal = FALSE)
>      help.start()
> needs to be
>      grDevices::ps.options(horizontal = FALSE)
>      utils::help.start()
> yet in the Help file under start up, we have

I guess you mean Startup.Rd in some unstated version of R like 2.4.1?
That needed updating.

> # Example of .Rprofile
> options(width=65, digits=5)
> options(show.signif.stars=FALSE)
> ps.options(horizontal=FALSE)
> ....
> Is this a conflict?

No one actually said it was a *working* example (and it is enclosed in 
\dontrun{}), which is what the FAQ entry is about.  A better version would 

setHook(packageEvent("grDevices", "onLoad"),
         function(...) grDevices::ps.options(horizontal=FALSE))

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

More information about the R-help mailing list