Re: [Rd] motivation for setRepositories and chooseCRANmirror

From: Uwe Ligges <>
Date: Sat 18 Jun 2005 - 13:16:35 GMT

Jeffrey Horner wrote:

> I have some questions and observations about these:
> Will these replace manually setting options(CRAN), which doesn't work in
> R-2.1.0?
> In R-2.1.0, setRepositories() looks to see if options("repos") contains
> a CRAN entry and will not override that CRAN entry even if the
> $R_HOME/etc/repositories file (which setRepositories reads from)
> contains a CRAN entry. Why is this? The user could easily set
> options("repos") without the help of this function anyway? And
> chooseCRANmirror() obviously sets the CRAN entry correctly.
> I've checked the latest nightly tarball, R-devel_2005-06-15.tar.gz, and
> this observations persists.
> I also observe that the R-2.1.0 Rprofile in the base package sets
> options(repos=c(CRAN="@CRAN@")), so it seems that the only way to set
> the CRAN repository entry is either with chooseCRANmirror() or manually
> setting options("repos") or options("CRAN"). If this was not the case,
> then setRepositories() would choose the CRAN entry from
> $R_HOME/etc/repositories.
> In R-2.1.0 and in R-devel_2005-06-15.tar.gz, the R-admin manual suggests
> that for packages to be downloaded and installed within R should set
> options(CRAN = ""). Will this be changed to
> calling chooseCRANmirror()?
> From an administrator's point of view, I would like to have the CRAN
> option set automatically on R startup for ALL users. That way I don't
> have to set this option before calling update.packages().

Hence, I have in our department's R installation's .../R/etc/ file (which is intended for configurations that apply to all users):

options(repos = c(

           CRAN = "",
           CRANextra = ""))

Uwe Ligges mailing list Received on Sat Jun 18 23:19:18 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:27:20 GMT