insideR: Make R Package Calls Transparent, Replayable, and Editable
Source:R/insider-package.R
insider-package.RdinsideR opens up R packages at two levels:
One call:
explain_call()shows which function actually runs behind a call (following S3 dispatch), what it calls internally, and how replayable it is;unpack_call()turns the call into a self-containedreplay.Rscript with documented extracted functions, captured inputs, and built-in verification against the original result — plus a static security scan of the extracted code.A whole package:
build_graph()indexes a package or source directory into a queryable code graph; explore it withgraph_search(),graph_node(),graph_callers(), andgraph_callees().
The goal is to reduce the fear that package logic is a black box, without destroying package discipline: users get visibility and a safe place to experiment, maintainers keep a clean API.