dependsOnPkgs
Find Reverse Dependencies

Description

Finds reverse-dependency packages.

Usage

dependsOnPkgs(pkgs, dependencies = c("Depends", "Imports", "LinkingTo"),
    recursive = TRUE, lib.loc = NULL,
    installed = utils::installed.packages(lib.loc, fields = "Enhances"))

Arguments

pkgs a character vector to indicate the names of packages to find the reverse dependency package names.
dependencies a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances") or a character string to indicate the dependency fields of installed packages. The character string could be "all" or "most". See details.
recursive a logical value. If TRUE (the default), it will find pkgs's reverse dependency package names recursively. Otherwise, only find reverse dependency package names for pkgs.
lib.loc a character vector containing the names of package library directories. If NULL, .libPaths() is used.
installed a character matrix containing the installed package information. See details.

Details

dependencies can be a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances"), indicates these fields of installed packages should be considered to find pkgs's reverse dependency package names. If dependencies is "all", it indicates "Depends", "Imports", "LinkingTo", "Suggests", "Enhances" should be considered, and if dependencies is "most", it indicates "Depends", "Imports", "LinkingTo", "Suggests" should be considered. By default, installed is the return value of installed.packages, with fields = "Enhances".
Value
returns a character vector containing the reverse dependency package names.
See Also
package_dependencies is a more general function for analyzing package dependencies.
Examples
library("tools")

# to find "tools" reverse dependency package names dependsOnPkgs("tools", recursive = FALSE)

# to find "tools"' reverse dependency package names recursively dependsOnPkgs("tools")

# to find all "tools" reverse dependency package names dependsOnPkgs("tools", dependencies = "all")

# to find most "tools" reverse dependency package names dependsOnPkgs("tools", dependencies = "most")

Package tools version 6.1.4-13
Package Index