inducedSubgraphByPkgs: Return a minimal subgraph based on package name(s)

Description Usage Arguments Examples

Description

Find the subgraph induced by including specific packages. The induced subgraph is the graph that includes the named packages and all edges connecting them. This is useful for a developer, for example, to examine her packages and their intervening dependencies.

Usage

1
inducedSubgraphByPkgs(g, pkgs, pkg_color = "red")

Arguments

g

an igraph graph, typically created by buildPkgDependencyIgraph

pkgs

character() vector of packages to include. Package names not included in the graph are ignored.

pkg_color

character(1) giving color of named packages. Other packages in the graph that fall in connecting paths will be colored as the igraph default.

Examples

1
2
3
4
5
6
7
8
library(igraph)
g = buildPkgDependencyIgraph(buildPkgDependencyDataFrame())
g2 = inducedSubgraphByPkgs(g, pkgs=c('GenomicFeatures',
'TCGAbiolinksGUI', 'BiocGenerics', 'org.Hs.eg.db', 'minfi', 'limma'))
g2
V(g2)

plot(g2)

Liubuntu/BiocPkgTools documentation built on July 8, 2019, 6:56 p.m.