Generate a tree of called functions by another function

What is the best way of obtaining a graph of all functions called by another function?

1 Like

Perhaps the profvis package on CRAN?

Have a look at pkgnet: Get Network Representation of an R Package

1 Like

Looks promising, thanks!

while I might use it in the future, is not exactly what I'm asking for. I also tried proftools, codetools and lobstr. The packages CodeDepends and CodeAnalysis don't seem to be very active and maintained.

The generated Function Network is almost what I'm looking for, however it only shows functions exported by the package that you generate the report for. I need something that also shows functions from the imported packages.

You could also try https://github.com/r-lib/pkgapi
No fancy graphs though :frowning_face:

1 Like

Awesome, both your suggestions might be enough for now. Thank you

It should be noted that the pkgapi will not spot the functions called by an 'apply' family of functions, while the pkgnet will.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.