Who calls this function?
Arguments
- graph
A
insider_graphfrombuild_graph(), or a target (source directory / installed package name) to build one from.- name
Exact node name to look up.
Value
A data frame of call sites: caller, its kind, and (in source mode) the file and line of each call.
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_callers(g, "g")
#> caller kind file line
#> 1 f function code.R 1