Description Usage Arguments Value See Also Examples
View source: R/buildPkgDependencyGraph.R
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
).
1 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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.