B.2 Set the R Repository
Instructions for setting the R repository.
Each time you install an R package from the R command line, you are asked which CRAN mirror, or server, R should use. To set the repository and avoid having to specify this during every package installation, create the R startup command file .Rprofile
in your home directory and specify the CRAN mirror to use. The following code sets the R package repository to the Seattle CRAN mirror at the start of each R session.
cat("Setting Seattle repository")
r = getOption("repos")
r["CRAN"] = "http://cran.fhcrc.org/"
options(repos = r)
rm(r)
Parent topic: R Package Installation Tips