install_deps: Install dependencies of project

View source: R/dependencies.R

install_depsR Documentation

Install dependencies of project

Description

Given a dependency_structure object, install the R packages

Usage

install_deps(
  dep_structure,
  install_project = TRUE,
  install_direction = "upstream",
  install_external_deps = TRUE,
  upgrade = "never",
  package_list = NULL,
  dry = FALSE,
  verbose = 1,
  ...
)

Arguments

dep_structure

(dependency_structure) output of function dependency_table; uses dep_structure$table to infer the packages to apply action to and infer installation order; uses dep_structure$deps to infer upstream dependencies

install_project

(logical) whether to also install the current package (i.e. the package named in dependency_structure$current_pkg), ignored unless install_direction = "upstream" (because downstream deps automatically install all their upstream deps)

install_direction

"upstream", "downstream" or "all"; which packages to install (according to dependency structure). By default this is only "upstream"

install_external_deps

logical to describe whether to install external dependencies of package using remotes::install_deps() (or renv::install() if inside an renv environment) .

upgrade

argument passed to remotes::install_deps(), defaults to 'never'. Ignored if inside an renv environment.

package_list

(character) If not NULL, an additional filter, only packages on this list will be considered and their dependencies installed if needed (advanced usage only).

dry

(logical) dry run that outputs what would happen without actually doing it.

verbose

(numeric)
verbosity level, incremental; (0: None, 1: packages that get installed + high-level git operations, 2: includes git checkout infos)

...

Additional args passed to remotes::install_deps(). Ignored if inside an renv environment.

Value

data.frame of performed actions

See Also

determine_branch

Examples

## Not run: 
x <- dependency_table(project = "./path/to/project")

install_deps(x)

# install all dependencies
install_deps(x, install_direction = "all")

## End(Not run)

openpharma/staged.dependencies documentation built on Aug. 27, 2023, 10:17 a.m.