download_version: Download a specified version of a CRAN package

Description Usage Arguments Value

View source: R/install-version.R

Description

It downloads the package to a temporary file, and returns the name of the file.

Usage

1
2
download_version(package, version = NULL, repos = getOption("repos"),
  type = getOption("pkgType"), ...)

Arguments

package

package name

version

If the specified version is NULL or the same as the most recent version of the package, this function simply calls utils::install.packages(). Otherwise, it looks at the list of archived source tarballs and tries to install an older version instead.

repos

character vector, the base URL(s) of the repositories to use, e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org". For more details on supported URL schemes see url.

Can be NULL to install from local files, directories or URLs: this will be inferred by extension from pkgs if of length one.

type

character, indicating the type of package to download and install. Will be "source" except on Windows and some macOS builds: see the section on ‘Binary packages’ for those.

...

Other arguments passed on to utils::install.packages().

Value

Name of the downloaded file.


metrumresearchgroup/rmotes documentation built on May 18, 2019, 2:35 a.m.