If you’re working with an R script that contains multiple user-defined functions and you’d like to see how they interact, you might find my CRAN package funcMapper useful.
It analyses a given R script and produces an interactive visNetwork graph showing the relationships between the functions defined in that script.
The function's parameters are shown below:
funcMapper(script_path, output_name, output_path, source = FALSE, cleanup_temp_file = TRUE)
For example:
funcMapper("main_script", "map_of_main_script", "~/test")
This generates an interactive map (map_of_main_script.html) illustrating how the functions in main_script.R call each other.
CRAN link: https://cran.r-project.org/web/packages/funcMapper/index.html
Github link: https://github.com/antoniof1704/funcMapper