callGraph: Create a Function Call Graph

callGraphR Documentation

Create a Function Call Graph

Description

This generic and methods creates a call graph (or data.frame of the caller and callee) identifying which function calls which other functions directly in its body or default values of the parameters.

Usage

callGraph(obj, ...)

Arguments

obj

the object containing the function(s) of interest. This can be a function object, a list of functions, the name of a package, an environment/namespace

...

additional arguments passed to the methods

Value

A data.frame with 2 columns. These specify the edges in the graph.

Author(s)

Duncan Temple Lang

See Also

makeCallGraph

Examples


g = callGraph(quote(lm(mpg ~ wt + log(disp), mtcars)), recursive = 2)
plot(g)

g2 = as(g, "igraph")


duncantl/CodeAnalysis documentation built on Feb. 21, 2024, 10:49 p.m.