View source: R/buildPkgDependencyGraph.R
buildPkgDependencyIgraph | R Documentation |
Package dependencies represent a directed
graph (though Bioconductor dependencies are
not an acyclic graph). This function simply
returns an igraph graph from the package
dependency data frame from a call to
buildPkgDependencyDataFrame
or
any tidy data frame with rows of (Package, dependency)
pairs. Additional columns are added as igraph edge
attributes (see graph_from_data_frame
).
buildPkgDependencyIgraph(pkgDepDF)
pkgDepDF |
a tidy data frame. See description for details. |
An igraph directed graph. See the igraph package for details of what can be done.
See buildPkgDependencyDataFrame
,
graph_from_data_frame
,
inducedSubgraphByPkgs
, subgraphByDegree
,
igraph-es-indexing
,
igraph-vs-indexing
library(igraph)
pkg_dep_df = buildPkgDependencyDataFrame()
# at this point, filter or join to manipulate
# dependency data frame as you see fit.
g = buildPkgDependencyIgraph(pkg_dep_df)
g
# Look at nodes and edges
head(V(g)) # vertices
head(E(g)) # edges
# subset graph by attributes
head(sort(degree(g, mode='in'), decreasing=TRUE))
head(sort(degree(g, mode='out'), decreasing=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.