Learn R Programming

CodeDepends (version 0.5-3)

makeCallGraph: Create a graph representing which functions call other functions

Description

This function and its methods provide facilities for constructing a graph representing which functions call which other functions.

Usage

makeCallGraph(obj, all = FALSE, ...)

Arguments

obj

The name of a package, optionally prefixed with "package:". Other inputs may be supported in the future

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

Value

An object of class graphNEL-class

See Also

The graph and Rgraphviz packages.

The SVGAnnotation package can be used to mae thee graphs interactive.

Examples

Run this code
# NOT RUN {
  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)
  }
# }

Run the code above in your browser using DataLab