lib.dependencies: List the dependencies of a package.

View source: R/VC_library_writing.R

lib.dependenciesR Documentation

List the dependencies of a package.

Description

Provide a package name (can be without quotes) to show its dependencies. To list all dependencies of the complete library, use the inverse function "lib.dependsOnMe(all)" with the value 'all'. That function also does not require quotes when calling it. So lib.dependencies(package.a) will work.

Usage

lib.dependencies(
  packageName,
  do_print = TRUE,
  character.only = FALSE,
  lib_location = lib.location()
)

Arguments

packageName

The (unquoted) package name for which you would like to print the dependencies.

do_print

If true (default), prints the dependencies. In both cases, the dependencies are returned invisibly.

character.only

If TRUE, (FALSE by default), the package names can be provided as character vector. Otherwise, direct unquoted package names are supported.

lib_location

The folder containing the R_MV_library structure where this function observes the dependencies. By default, it checks the environment variable R_MV_LIBRARY_LOCATION for this directory.

Value

When do_print is TRUE, will print use message to show the provided package(s) his dependencies. Also returns the dependencies invisibly.

Examples

## Not run: 
    lib.dependencies(dplyr)
    lib.dependencies('devtools', character.only = TRUE)
    devtools_deps <- lib.dependencies(devtools, do_print = FALSE)

## End(Not run)


multiversion documentation built on March 22, 2022, 1:07 a.m.