Skip to contents

Walks the internal callees reachable from a root node and ranks candidate functions by how locally they are used.

Usage

find_modification_points(graph, name)

Arguments

graph

An insider_graph object, a source directory, or an installed package name.

name

Exact node name to look up.

Value

An insider_modification_points object.

Examples

dir <- tempfile()
dir.create(dir)
writeLines(
  c(
    "root <- function() mid()",
    "mid <- function() leaf()",
    "leaf <- function() 1"
  ),
  file.path(dir, "code.R")
)
g <- build_graph(dir, cache = FALSE)
find_modification_points(g, "root")
#> 
#> ── root ────────────────────────────────────────────────────────────────────────
#> • leaf | callers: 1 | exported: FALSE | compiled: FALSE | safe to patch locally
#> • mid | callers: 1 | exported: FALSE | compiled: FALSE | safe to patch locally