provision_library: Create or update a library

Description Usage Arguments Details Author(s)

View source: R/provision_library.R

Description

Create or update a library of packages.

Usage

1
2
3
4
provision_library(packages, lib, platform = NULL, version = NULL,
  src = NULL, check_dependencies = TRUE,
  installed_action = "upgrade", allow_missing = FALSE,
  refresh_drat = FALSE, quiet = FALSE, progress = NULL)

Arguments

packages

A character vector of packages to include

lib

A path to the library; if it does not exist, it will be created. If given as a vector of libraries (i.e., with more than one element) then packages will be installed into the first library, but subsequent libraries will be checked to make sure that dependencies are satisfied.

platform

The platform to create the library for. If NULL then we build for the current platform (using install_packages if version is NULL or compatible with our current version). Otherwise this can be one of "windows", "macosx", "macosx/mavericks" or "linux", correspinding to the different directories that binaries live in (in the case of "linux" there are no binaries and things are a little more complicated).

version

The version of R to install packages for. By default, we use the same version (major.minor) as the current running R version. Otherwise provide the desired version number as a string or numeric_version object.

src

An optional description of additional packages, using package_sources. It will only be rebuilt (fetching packages) if it has never been built, or of packages listed in the spec element are not found in the repository.

check_dependencies

Logical, indicating if dependencies of packges should be checked. If TRUE, then any missing dependencies (packages in Depends, Imports or LinkingTo of the requested packages) will be installed.

installed_action

The behaviour when some packages are already installed. Options are "replace" (will re-install the package and, for cross-installation, its dependencies), "upgrade_all" (upgrade all packages that lag behind the versions in repositories), "upgrade" (upgrade packages listed in "packages" only, but not their dependencies) and "skip" (do not install or upgrade any package that is already installed).

allow_missing

For cross-installation (via cross_install when platform is non-NULL), allow packages to be missing that need to be compiled? The interface here is going to change a bunch, so watch out...

refresh_drat

Logical indicating if the cache of packages pointed to by src should be refreshed. The other way of forcing this would be to pass expire = 0 through to the package_sources argument but this is likely to be tidier.

quiet

Passed through to to install.packages, indicating if package installation should be done quietly. With this as FALSE (the default) rather a lot of output can be generated.

progress

Passed through to the package downloading to control printing of the progress bar.

Details

Cross installation of binary files is difficult and I need to come up with a way of making that work nicely.

Author(s)

Rich FitzJohn


mrc-ide/provisionr documentation built on Sept. 7, 2020, 10:01 a.m.