order_pkgs: Order packages by their dependencies

Description Usage Arguments Details Value Author(s)

View source: R/package_dep.R

Description

Order packages by their dependencies

Usage

1
order_pkgs(pkgs, inst_pkgs, which = c("Depends", "Imports", "LinkingTo"))

Arguments

pkgs

The packages to order

inst_pkgs

a database of installed packages as returned by installed.packages.

which

Which type of dependencies should be taken into account. a character vector listing the types of dependencies, a subset of <e2><80><98>c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")<e2><80><99>. Character string <e2><80><98>"all"<e2><80><99> is shorthand for that vector, character string <e2><80><98>"most"<e2><80><99> for the same vector without <e2><80><98>"Enhances"<e2><80><99>.

Details

Given packages, the function orders them so that every package only depends on other packages with lower order number. This way, they can safely be removed from the highest value down.

Value

A data frame with the column 'pkg' giving the name of the package and 'level', by which the dataframe is sorted from lowest to highest.

Author(s)

Holger Hoefling


hhoeflin/sanitizr documentation built on May 28, 2019, 5:43 a.m.