[R] Setting site-wide default CRAN repository?

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Mar 19 08:48:14 CET 2007

On Sun, 18 Mar 2007, Tim Keitt wrote:

> I can't seem to find this anywhere. How do I set the default CRAN
> repository _site wide_ on a linux box? What I want to do is eliminate
> the pop-up list of repository locations when using
> 'install.packages()'. I know how to do this for a single account.
> Modifying files in /etc/R does not seem to work. (cc me please - I
> think I'm not subscribed).

Modifying files in R_HOME/etc works, but I have no idea why you think 
/etc/R is relevant.

The simplest way is to replace @CRAN@ in R_HOME/etc/repositories.  (See 

Almost as simple is to set e.g.


in R_HOME/etc/Rprofile.site (see ?Startup).

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