makeCallGraph | R Documentation |
This function draws each routine in the specified file or translation unit as a node and adds directed edges from one node to another if the body of the former node calls the latter routine.
makeCallGraph(tu, withinFile = TRUE, .plot = TRUE, ...)
tu |
the name of a source file or a previously created translation unit object. |
withinFile |
a logical value that controls whether we only show calls to routines that are located in this translation unit or show nodes for routines that are not in this translation unit but are invoked in the code of any of the routines. |
... |
additional arguments that are passed to
|
.plot |
a logical value that controls whether we draw the graph or just return the adjacency matrix. |
This uses the igraph
package.
If .plot
is TRUE
and the igraph
package is available, the graph is displayed.
In either case, the adjacency matrix is returned.
Duncan Temple Lang
libclang http://clang.llvm.org/doxygen/group__CINDEX.html
graph.adjacency
in the igraph
package.
g = makeCallGraph(system.file("exampleCode", "clangGen.c", package = "RCIndex"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.