View source: R/install-packages.R
install_packages | R Documentation |
Install Packages from Repositories or Local Files, with Caching
install_packages(pkgs, lib, repos = getOption("repos"),
contriburl = contrib.url(repos, type), method, available = NULL,
destdir = NULL, dependencies = NA, type = getOption("pkgType"),
...)
pkgs |
character vector of the names of packages whose current versions should be downloaded from the repositories. If If this is missing or a zero-length character vector, a listbox of available packages is presented where possible in an interactive R session. |
lib |
character vector giving the library directories where to
install the packages. Recycled as needed. If missing, defaults to
the first element of |
repos |
character vector, the base URL(s) of the repositories
to use, e.g., the URL of a CRAN mirror such as
Can be |
contriburl |
URL(s) of the contrib sections of the repositories. Use this
argument if your repository mirror is incomplete, e.g., because
you burned only the ‘contrib’ section on a CD, or only have
binary packages. Overrides argument |
method |
download method, see |
available |
a matrix as returned by |
destdir |
directory where downloaded packages are stored. If it is
|
dependencies |
logical indicating whether to also install
uninstalled packages which these packages depend on/link
to/import/suggest (and so on recursively). Not used if Only supported if The default,
In all of these, |
type |
character, indicating the type of package to download and
install. Will be |
... |
additional arguments are passed to
|
Other caching package management functions: available_packages
,
download_packages
,
update_packages
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.