vcInstall: Installs a specific version of a package alongside other...

Description Usage Arguments Details Value Examples

Description

Installs a specific version of a package alongside other versions of that package

Usage

1
2
vcInstall(package, version, type = c("source", "windows", "macosx"),
  searchAhead = 7, ...)

Arguments

package

character vector of the names of packages which should be downloaded and installed.

version

character vector of the required versions of packages which should be downloaded and installed.

type

character, indicating the type of package to download and install. Will be "source" by default unless you request "windows" for Windows binaries or "macosx" for MacOS X binaries.

searchAhead

numeric, indicating the number of days to search ahead in the MRAN when looking for a specific version and/or type.

...

arguments to to be passed to install.packages

Details

The function will attempt to identify where the specific version can be found by checking the current CRAN and CRAN Archives. If the requested version is identified in the archives, it will attempt to install the package from MRAN (Microsoft's snapshot version of CRAN) to ensure dependencies are installed correctly as well. If the requested version is the current version on CRAN, it installs it from the RStudio mirror. This means that it does not support installing packages from other repositories (custom, Bioconductor, GitHub, etc.) To support multiple versions of packages being installed side-by-side, this function creates new directories near your primary library based on package name and version. This supports reusing the same version of a package inside multiple scripts or projects. The version matching includes the use of 'x' for variable versioning. Package versions are often of the sort major.minor.patch - if your code is resilient against patch versions of the code you could request version 1.1.x which would install the most recent version which has a major version of 1, a minor version of 1 and any patch version. Note, 1.x.1 is not a supported form of version matching - this will be interpreted as 1.x

Value

invisible NULL

Examples

1
2
3
vcInstall('coin','1.1x')
# Identical to
vcInstall('coin','1.1-3')

bmewing/VersionControl documentation built on May 23, 2019, 7:21 a.m.