pac_true_size: True size of the package

View source: R/size.R

pac_true_sizeR Documentation

True size of the package

Description

True size of the package as it takes into account its all dependencies, recursively.

Usage

pac_true_size(
  pac,
  fields = c("Depends", "Imports", "LinkingTo"),
  lib.loc = .libPaths(),
  exclude_joint = 0L
)

Arguments

pac

character a package name.

fields

a 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. Default: .libPaths()

exclude_joint

integer exclude packages which are dependencies of at least N other packages, not count main package dependencies. Default: 0

Value

numeric size in bytes, to get MB then divide by 10**6.

Note

R base packages are not counted. The default value of fields should be suited for almost all scenarios.

Examples

## Not run: 
# size in MB, with all its dependencies
pacs::pac_true_size("memoise") / 10**6

## End(Not run)

pacs documentation built on May 11, 2022, 1:09 a.m.