Learn R Programming

risk.assessr (version 3.0.1)

dependsOnPkgs: Determine Packages that Depend on Given Packages

Description

This function identifies packages that depend on the specified packages, considering various types of dependencies (e.g., strong, most, all).

Usage

dependsOnPkgs(
  pkgs,
  dependencies = "most",
  recursive = TRUE,
  lib.loc = NULL,
  installed = NULL
)

Value

A character vector of package names that depend on the specified packages.

Arguments

pkgs

A character vector of package names to check dependencies for.

dependencies

A character string specifying the types of dependencies to consider. Can be "strong", "most", "all", or a custom vector of dependency types.

recursive

A logical value indicating whether to recursively check dependencies.

lib.loc

A character vector of library locations to search for installed packages.

installed

A matrix of installed packages, obtained from cran_packages function. .

Examples

Run this code
if (FALSE) {
installed <- cran_packages()
dependsOnPkgs("here", installed = installed)
}

Run the code above in your browser using DataLab