Show one definition with its source and line numbers
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 insider_node object; printing it shows the definition's
location and line-numbered source. The object contains both id (the
stable qualified identity) and name (the short display label).
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_node(g, "g")
#>
#> ── g ───────────────────────────────────────────────────────────────────────────
#> Kind: function
#> Location: code.R:2-2
#> 2 | g <- function(x) x + 1