Skip to contents

What does this function call?

Usage

graph_callees(graph, name, internal_only = FALSE)

Arguments

graph

A insider_graph from build_graph(), or a target (source directory / installed package name) to build one from.

name

Exact node name to look up.

internal_only

Keep only calls to functions defined inside the graphed package/directory (drop calls into base R and other packages)?

Value

A data frame of callees: name, whether it is internal to the graph, and (in source mode) the file and line of each call site.

Examples

dir <- tempfile()
dir.create(dir)
writeLines("f <- function(x) g(x)\ng <- function(x) x + 1", file.path(dir, "code.R"))
g <- build_graph(dir, cache = FALSE)
graph_callees(g, "f")
#>   callee internal   file line
#> 1      g     TRUE code.R    1