chooseCRANmirror
Comprehensive R Archive Network
Description
Finds and chooses a CRAN mirror from which to download R packages.
Usage
chooseCRANmirror(graphics = getOption("menu.graphics", default = FALSE),
ind = NULL, useHTTPS = getOption("useHTTPS", TRUE))
getCRANmirrors(all = FALSE, local.only = FALSE)
Arguments
graphics |
This argument is ignored.
|
ind |
A positive integer. If NULL (the default), then chooseCRANmirror displays a menu of CRAN mirror
sites from which to choose. Otherwise, ind should specify the entry in the
output of getCRANmirrors() to use as the CRAN mirror.
(Mirror 1, at https://cran.rstudio.com, is generally a good choice.)
|
useHTTPS |
A logical value. If TRUE (the default), then the menu displays only the CRAN mirrors using
the secure http (https) protocol. If FALSE, then the menu displays only the CRAN mirrors
using the nonsecure (http) protocol.
|
all |
All arguments to getCRANmirrors are ignored at this time.
|
local.only |
All arguments to getCRANmirrors are ignored at this time.
|
Details
The Comprehensive R Archive Network stores several thousand R packages.
To spread the load and shorten communication times, you are encouraged
to choose a mirror of CRAN that is close to you.
chooseCRANmirror stores your choice of mirrors in the "CRAN"
element of the list of repositories in getOption("repos").
available.packages() checks if getOption("repos")["CRAN"] has the
special value "@CRAN@", and if it does, and if the current Spotfire Enterprise Runtime for R session is
an interactive session, getOption("repos")["CRAN"] calls
chooseCRANmirror() to prompt the user to choose a repository.
Value
getCRANmirrors | returns a data.frame containing information about each mirror site.
The data.frame contains the columns "Name", "Country", "City", "URL", "Host", "Maintainer", "OK",
"CountryCode", and "Comment". |
chooseCRANmirror | returns NULL invisibly. This function is called for its side effect of
setting getOption("repos")["CRAN"]. |
See Also
Examples
head(getCRANmirrors()$URL)