EVOLUTION-MANAGER
Edit File: download.packages.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Download Packages from CRAN-like Repositories</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for download.packages {utils}"><tr><td>download.packages {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Download Packages from CRAN-like Repositories</h2> <h3>Description</h3> <p>These functions can be used to automatically compare the version numbers of installed packages with the newest available version on the repositories and update outdated packages on the fly. </p> <h3>Usage</h3> <pre> download.packages(pkgs, destdir, available = NULL, repos = getOption("repos"), contriburl = contrib.url(repos, type), method, type = getOption("pkgType"), ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>pkgs</code></td> <td> <p>character vector of the names of packages whose latest available versions should be downloaded from the repositories. </p> </td></tr> <tr valign="top"><td><code>destdir</code></td> <td> <p>directory where downloaded packages are to be stored. </p> </td></tr> <tr valign="top"><td><code>available</code></td> <td> <p>an object as returned by <code><a href="available.packages.html">available.packages</a></code> listing packages available at the repositories, or <code>NULL</code> which makes an internal call to <code>available.packages</code>. </p> </td></tr> <tr valign="top"><td><code>repos</code></td> <td> <p>character vector, the base URL(s) of the repositories to use, i.e., the URL of the CRAN master such as <code>"https://cran.r-project.org"</code> or its Statlib mirror, <code>"http://lib.stat.cmu.edu/R/CRAN"</code>. </p> </td></tr> <tr valign="top"><td><code>contriburl</code></td> <td> <p>URL(s) of the contrib sections of the repositories. Use this argument only if your repository mirror is incomplete, e.g., because you burned only the ‘<span class="file">contrib</span>’ section on a CD. Overrides argument <code>repos</code>. </p> </td></tr> <tr valign="top"><td><code>method</code></td> <td> <p>Download method, see <code><a href="download.file.html">download.file</a></code>. </p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>character string, indicate which type of packages: see <code><a href="install.packages.html">install.packages</a></code> and ‘Details’. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments to be passed to <code><a href="download.file.html">download.file</a></code> and <code><a href="available.packages.html">available.packages</a></code>. </p> </td></tr> </table> <h3>Details</h3> <p><code>download.packages</code> takes a list of package names and a destination directory, downloads the newest versions and saves them in <code>destdir</code>. If the list of available packages is not given as argument, it is obtained from repositories. If a repository is local, i.e. the URL starts with <code>"file:"</code>, then the packages are not downloaded but used directly. Both <code>"file:"</code> and <code>"file:///"</code> are allowed as prefixes to a file path. Use the latter only for URLs: see <code><a href="../../base/html/connections.html">url</a></code> for their interpretation. (Other forms of <span class="samp">file://</span> URLs are not supported.) </p> <p>For <code>download.packages</code>, <code>type = "both"</code> looks at source packages only. </p> <h3>Value</h3> <p>A two-column matrix of names and destination file names of those packages successfully downloaded. If packages are not available or there is a problem with the download, suitable warnings are given. </p> <h3>See Also</h3> <p><code><a href="available.packages.html">available.packages</a></code>, <code><a href="contrib.url.html">contrib.url</a></code>. </p> <p>The main use is by <code><a href="install.packages.html">install.packages</a></code>. </p> <p>See <code><a href="download.file.html">download.file</a></code> for how to handle proxies and other options to monitor file transfers. </p> <p>The ‘R Installation and Administration’ manual for how to set up a repository. </p> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>