contrib.url
Find Appropriate Paths in CRAN-like Repositories
Description
Adds the appropriate path to each URL in repos.
Usage
contrib.url(repos, type = getOption("pkgType"))
Arguments
repos |
a character vector contains the base URL of the repositories. If it is 'NULL', to install from local files.
|
type |
a character vector to indicate the type of package to download an install.
The possible values can be "source", "mac.binary", "mac.binary.leopard", "win.binary" and "win64.binary".
|
Details
According to the type, the returned value is set to different path with R's current version number.
If the string "@CRAN" exists in repos and interactive mode is TRUE, in GUI version, a dialog will appear to let user select a CRAN mirror.
Please refer to the example to see how this works.
Value
If repos is NULL, it returns NULL.
Otherwise, a character vector with the same lenght of repos will be returned.
See Also
Examples
contrib.url("http://mycorp.com/repos")
contrib.url("http://mycorp.com/repos", type="source")
## Not run: contrib.url("@CRAN@","source") # you will be asked to choose from a list of CRAN mirrors