as_pkg_dependencies {pkgdepends}R Documentation

Shorthands for dependency specifications

Description

Shorthands for dependency specifications

Usage

as_pkg_dependencies(deps)

Arguments

deps

See below.

Details

R packages may have various types of dependencies, see Writing R Extensions.

pkgdepends groups dependencies into three groups:

pkgdepends supports concise ways of specifying which types of dependencies of a package should be installed. It is similar to how utils::install.packages() interprets its dependencies argument.

You typically use one of these values:

If you need more flexibility, the full description of possible values for the deps argument are:

If "hard" is included in the value or a list element, then it is replaced by the hard dependency types. If "soft" or "all" is included, then it is replaced by all hard and soft dependency.

Extra dependencies

pkgdepends supports extra dependency types for direct installations not from CRAN-like repositories. These are specified with a ⁠Config/Needs/⁠ prefix in the DESCRIPTION and they can contain package references, separated by commas. For example you can specify packages that are only needed for the pkgdown website of the package:

Config/Needs/website: r-lib/pkgdown

To use these dependency types, you need to specify them in the deps argument to pkgdepends functions.

Note that ⁠Config/Needs/*⁠ fields are currently not used from CRAN packages, and packages in CRAN-like repositories in general.

Usually you specify that a ⁠Config/Needs/*⁠ dependency type should be installed together with "hard" or "all", to install all hard or soft dependencies as well.

Value

A named list with two character vectors: direct, indirect, the dependency types to use for direct installations and dependent packages.

See Also

Other package dependency utilities: pkg_dep_types_hard()


[Package pkgdepends version 0.7.2 Index]