inducedSubgraphByPkgs {BiocPkgTools} | R Documentation |
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.
inducedSubgraphByPkgs(g, pkgs, pkg_color = "red")
g |
an igraph graph, typically created by
|
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. |
library(igraph) g = buildPkgDependencyIgraph(buildPkgDependencyDataFrame()) g2 = inducedSubgraphByPkgs(g, pkgs=c('GenomicFeatures', 'TCGAbiolinksGUI', 'BiocGenerics', 'org.Hs.eg.db', 'minfi', 'limma')) g2 V(g2) plot(g2)