[R] Changing default browser in options()

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 12 08:40:36 CEST 2003


On Mon, 11 Aug 2003, Jorge A Ahumada wrote:

> I usually startup R from within several directories (usually where the 
> programs or data of interest are).  I like to use a small web browser 
> called dillo to browse help files.  However, by default R looks for 
> mozilla, so I have to type every single R session:

Actually R looks for browser specified at configure time (if this is a 
Unix-alike).  So the first idea is to configure R to use dillo.
The default setting of options("browser") is set to be

options(browser = as.vector(Sys.getenv("R_BROWSER")))

and the browser found at configure time is set in the R_BROWSER variable 
in the file etc/Renviron.  So the second idea is to edit that file.

Finally, if this is a shared system, you can have the following in your
~/.Renviron file

R_BROWSER=${R_BROWSER-'dillo'}

See ?Startup.  (You could also use the Rprofile files, but people normally 
only have one .Renviron file.)

> 
>  > options(browser='dillo')
> 
> Is there anyway I can change this globally?

Several: see above.

-- 
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