makeCallGraph | R Documentation |
This function and its methods provide facilities for constructing a graph representing which functions call which other functions.
makeCallGraph(obj, all = FALSE, ...)
obj |
The name of one or more packages as a string, optionally prefixed with
|
all |
a logical value that controls whether the graph includes all the functions called by any of the target functions. This will greatly expand the graph. |
... |
additional parameters for the methods |
An object of class graphNEL-class
We may extend this to deal with global variables and methods
Duncan Temple Lang
The graph
and Rgraphviz
packages.
The SVGAnnotation
package can be used to mae thee graphs interactive.
gg = makeCallGraph("package:CodeDepends")
if(require(Rgraphviz)) {
plot(gg, "twopi")
ag = agopen(gg, layoutType = "circo", name = "bob")
plot(ag)
}
if(require(Rgraphviz)) {
# Bigger fonts.
zz = layoutGraph(gg)
graph.par(list(nodes = list(fontsize = 48)))
renderGraph(zz)
}
# Two packages
library(codetools)
gg = makeCallGraph(c("package:CodeDepends", "package:codetools"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.