download_packages: Download Package from CRAN-like Repositories, with Caching

View source: R/download-packages.R

download_packagesR Documentation

Download Package from CRAN-like Repositories, with Caching

Description

Download Package from CRAN-like Repositories, with Caching

Usage

download_packages(pkgs, destdir, available = NULL,
  repos = getOption("repos"), contriburl = contrib.url(repos, type),
  method, type = getOption("pkgType"), ...)

Arguments

pkgs

character vector of the names of packages whose latest available versions should be downloaded from the repositories.

destdir

directory where downloaded packages are to be stored.

available

an object as returned by available.packages listing packages available at the repositories, or NULL which makes an internal call to available.packages.

repos

character vector, the base URL(s) of the repositories to use, i.e., the URL of the CRAN master such as "https://cran.r-project.org" or its Statlib mirror, "http://lib.stat.cmu.edu/R/CRAN".

contriburl

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 ‘contrib’ section on a CD. Overrides argument repos.

method

Download method, see download.file.

type

character string, indicate which type of packages: see install.packages and ‘Details’.

...

additional arguments are passed to utils::download.packages().

See Also

Other caching package management functions: available_packages, install_packages, update_packages


r-lib/crancache documentation built on July 27, 2023, 4:55 p.m.