buildPkgDepGraph {reposTools} | R Documentation |
Given a package name, will generate a dependency graph for that package, detailing all of that package's dependencies, those packages' dependencies, etc.
buildPkgDepGraph(pkg, repEntry, type, curNodes = vector(mode = "character"))
pkg |
The name of the package to use as the base |
repEntry |
If desired, the specific repository to look for the package. Defaults to the reposTools system repositories if none is specified. |
type |
The download type, ie 'unix', 'windows', etc. If not specified, will attempt to determine the proper type. |
curNodes |
Any current nodes in a graph. Not intended to be used by the end user. |
This function will recursively generate a dependency graph for a
package by first looking at all of its dependencies and then tracking
downt he dependencies for each of those packages, and so on. After
the conclusion of every recursive call, the new subgraph is connected
to the primary graph via the join
method for graphs.
If multiple versions of a package are found, the highest version of the package will be selected for usage in this function.
An object of class graphNEL
detailing the dependency graph for
the specified package.
Jeff Gentry
if (require(graph)) { z <- buildPkgDepGraph("reposTools") if (interactive()) { ## If you have Rgraphviz package, can plot the graph if (require(Rgraphviz)) plot(z) } }