\HeaderA{chooseCRANmirror}{Select a CRAN Mirror}{chooseCRANmirror}
\aliasA{getCRANmirrors}{chooseCRANmirror}{getCRANmirrors}
\keyword{utilities}{chooseCRANmirror}
\begin{Description}\relax
Interact with the user to choose a CRAN mirror.
\end{Description}
\begin{Usage}
\begin{verbatim}
chooseCRANmirror(graphics = getOption("menu.graphics"))

getCRANmirrors(all = FALSE, local.only = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{graphics}] Logical.
If true and \pkg{tcltk} and an X server are available, use a Tk
widget, or if under the AQUA interface use a MacOS X widget,
otherwise use \code{\LinkA{menu}{menu}}.
\item[\code{all}] Logical, get all known mirrors or only the ones flagged as
OK.
\item[\code{local.only}] Logical, try to get most recent list from CRAN or
use file on local disk only.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A list of mirrors is stored in file
\file{R\_HOME/doc/CRAN\_mirrors.csv}, but first an on-line list of
current mirrors is consulted, and the file copy used only if the
on-line list is inaccessible.

This function was originally written to support a Windows GUI menu
item, but is also called by \code{\LinkA{contrib.url}{contrib.url}} if it finds the
initial dummy value of \code{\LinkA{options}{options}("repos")}.
\end{Details}
\begin{Value}
None for \code{chooseCRANmirror()}, this function is invoked for its
side effect of updating \code{options("repos")}.

\code{getCRANmirrors()} returns a data frame with mirror information.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{setRepositories}{setRepositories}}, \code{\LinkA{contrib.url}{contrib.url}}.
\end{SeeAlso}

