get_graph_all_packages: Graph of dependencies of all CRAN packages

View source: R/graph.R

get_graph_all_packagesR Documentation

Graph of dependencies of all CRAN packages

Description

get_graph_all_packages returns an igraph object representing the network of one or more types of dependencies of all CRAN packages.

Usage

get_graph_all_packages(type, gc = TRUE, reverse = FALSE)

Arguments

type

A character vector that contains one or more of the following dependency words: "Depends", "Imports", "LinkingTo", "Suggests", "Enhances", up to letter case and space replaced by underscore. Alternatively, if 'types = "all"', all five dependencies will be obtained.

gc

Boolean, if 'TRUE' (default) then the giant component is extracted, if 'FALSE' then the whole graph is returned

reverse

Boolean, whether forward (FALSE, default) or reverse (TRUE) dependencies are requested.

Value

An igraph object & a connected graph if gc is 'TRUE'

See Also

get_dep_all_packages for the dependencies of all CRAN packages in a data frame, and df_to_graph for constructing the giant component of the network from two data frames

Examples

## Not run: 
g0.cran.depends <- get_graph_all_packages("depends")
g1.cran.imports <- get_graph_all_packages("imports", reverse = TRUE)

## End(Not run)

crandep documentation built on Sept. 11, 2024, 8:01 p.m.