Learn R Programming

pacs (version 0.6.0)

pac_deps_heavy: Package direct dependencies and number of dependencies for each of them

Description

A higher-level function, build from pacs::pacs_deps and tools::package_dependencies. A tool to identify a main sources of dependencies, which direct dependencies are the heaviest one.

Usage

pac_deps_heavy(
  pac,
  fields = c("Depends", "Imports", "LinkingTo"),
  lib.loc = .libPaths(),
  base = FALSE,
  local = FALSE,
  repos = pacs::biocran_repos()
)

Value

data.frame with three columns c("Package", "NrDeps", "NrUniqueDeps"): package name, number of dependencies and number of unique dependencies (not shared by other direct dependencies).

Arguments

pac

character a package name.

fields

character vector listing the types of dependencies, a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances"). Character string "all" is shorthand for that vector, character string "most" for the same vector without "Enhances", character string "strong" (default) for the first three elements of that vector. Default: c("Depends", "Imports", "LinkingTo")

lib.loc

character vector of search paths with local packages. Default: .libPaths()

base

logical if to add base packages too. If TRUE then pacs::pacs_base() are taken into account. Default: FALSE

local

logical if to use local repository (or newest remote packages). Default: FALSE

repos

character vector of repositories URLs to use. By default checking CRAN and newest Bioconductor per R version. Default pacs::biocran_repos()

Examples

Run this code
if (FALSE) {
pacs::pac_deps_heavy("caret")
pacs::pac_deps_heavy("dplyr")
}

Run the code above in your browser using DataLab