Learn R Programming

crandep (version 0.3.11)

get_graph_all_packages: 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)

Value

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

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.

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

Run this code
if (FALSE) {
g0.cran.depends <- get_graph_all_packages("depends")
g1.cran.imports <- get_graph_all_packages("imports", reverse = TRUE)
}

Run the code above in your browser using DataLab