install {deps}R Documentation

Install Dependencies

Description

Install dependencies from an existing dependencies.json file or after discovering the dependencies.

Usage

install(
  dir = getwd(),
  file = "dependencies.json",
  upgrade = "never",
  cleanup = TRUE,
  timeout = 300L,
  ask = TRUE,
  ...
)

Arguments

dir

Path to the directory where the JSON file should be written to.

file

The name of the file to be save, default is "dependencies.json". If the file is not found in dir, create() is called.

upgrade

Should package dependencies be upgraded? Argument passed to remotes functions.

cleanup

Logical, clean up files created by create() when file does not exist.

timeout

Integer, timeout for file downloads (default 60 seconds can be short).

ask

Logical, asking confirmation before writing the dependencies.json file.

...

Other argument passed to remotes functions.

Value

Returns NULL invisibly. The side effect is the dependencies installed.

Examples

dir <- system.file("examples/01-basic", package = "deps")
out <- tempdir()
create(dir, output = out, ask = interactive())
cat(readLines(file.path(out, "dependencies.json")), sep = "\n")
## Not run: 
install(out)

## End(Not run)
unlink(file.path(out, "dependencies.json"))


[Package deps version 0.4.0 Index]