0

Is there a function or debugger in R to show what functions were called by a function? i.e., it would function a bit like traceback but triggered by a call to function instead of an error, and showing not just the stack but the tree of function calls. Like:

A-> B -> C -> D
    E -> F
    G -> C -> D
tim
  • 3,559
  • 1
  • 33
  • 46
  • 1
    Not sure if this is a duplicate, but the following might be useful: [Generating a call graph in R](https://stackoverflow.com/questions/4795982/generating-a-call-graph-in-r) and [Finding out which functions are called within a given function](https://stackoverflow.com/questions/11872879/finding-out-which-functions-are-called-within-a-given-function) – Maurits Evers May 23 '19 at 16:16
  • Edit : I think this may be a duplicate too. – Gainz May 23 '19 at 16:16
  • My first thought was profiling, which might be overkill for what you want ... but then again, conditional branches in code make call-graphs context-specific, so profiling with a spread of parameters will eventually show a bigger picture (if not the "whole picture"). – r2evans May 23 '19 at 16:48
  • thanks - I agree those questions (I didn't use the term call-graph) will generate the answer I am looking for – tim May 23 '19 at 17:17
  • Are we happy to close this as duplicate, Tim? – zx8754 May 23 '19 at 17:39
  • 1
    Yes: let's close as dup – tim May 23 '19 at 21:36

0 Answers0