foreman
foreman copied to clipboard
Caller-callee relationship for .R files in a package
In R packages, I try to organize the code in .R files so that if a function in a.R
calls a function in b.R
, no function from b.R
calls back to a.R
, also not indirectly. How can foreman help verify or visualize this?
Can we do a graphviz visualization with subgraphs -- each file creates a subgraph, each node is a function?
Can we create an igraph object, search for cycles, remove one edge, search again, ... to summarize? (We could label the edges so that they are named by the caller, to identify which function creates the cycle.)
I haven't tried the package yet, appreciate any pointers. Thanks!