Assuming a project where files source each other, draw their dependency graph.
flow_view_source_calls( paths = ".", recursive = TRUE, basename = TRUE, extension = FALSE, smart = TRUE, out = NULL )
Paths to scripts or folders containing scripts By default explores the working directory.
paths contains directories
Whether to display only the base name of the script
Whether to display the extension
Whether to parse complex source calls for strings that look like script and
match those to files found in
a path to save the diagram to. Special values "html", "htm", "png", "pdf", "jpg" and "jpeg" can be used to export the object to a temp file of the relevant format and open it, if a regular path is used the format will be guessed from the extension. Other special values "data" and "code" can be used for respectively retrieving the graph data as a data frame and the diagram code.
flow_view_source_calls() returns a
"flow_diagram" object by default, and the output path invisibly if
out is not
NULL (called for side effects).
flow_run() returns the output of the wrapped call.
This evaluates the
file argument of
source in the global environment,
when this fails, as it might with constructs like
for (file in files) source(file)
the unevaluated argument is printed instead between backticks. Since this messes
up the relationships in the graph, an warning is thus issued. In a case like
my_dir will be enough to solve the issue.
In the latter case, if
TRUE, the function will check in all the paths in scope
if any script is named "foo.R" and will consider it if a single fitting candidate is found.