flow_view()
shows the code of a function as a flow diagram, flow_run()
runs a call and draws the logical path taken by the code, flow_data()
is
the lower level function, which builds the edge and node data rendered by
flow_view()
and flow_run()
.
flow_data(
x,
range = NULL,
prefix = NULL,
sub_fun_id = NULL,
swap = TRUE,
narrow = FALSE
)flow_view(
x,
range = NULL,
prefix = NULL,
sub_fun_id = NULL,
swap = TRUE,
narrow = FALSE,
code = TRUE,
width = NULL,
height = NULL,
...,
out = NULL,
svg = FALSE,
engine = c("nomnoml", "plantuml")
)
flow_run(
x,
prefix = NULL,
swap = TRUE,
code = TRUE,
...,
out = NULL,
svg = FALSE,
browse = FALSE,
show_passes = FALSE
)
A call, a function, or a path to a script
numeric vector used to compute the range of boxes to zoom in
prefix to use for special comments in our code used as block headers,
must start with "#"
if not NULL, the index or name of the function definition found in x that we wish to inspect
whether to change var <- if(cond) expr
into
if(cond) var <- expr
so the diagram displays better
TRUE
makes sure the diagram stays centered on one column
(they'll be longer but won't shift to the right)
Whether to display the code in code blocks or only the header, to be
more compact, if NA
, the code will be displayed only if no header is
defined by special comments.
Width and height in pixels, passed to htmlwidgets::createWidget()
Additional parameters passed to build_nomnoml_code()
a path to save the diagram to. Special values "html", "htm", "png", "pdf", "jpg" and "jpeg" can be used to export the objec 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.
only for default or html outut, whether to use svg rendering, rendering is more robust without it, but it makes text selectable on output which is sometimes useful
Either "nomnoml"
(default) or "plantuml"
(experimental), if
the latter, arguments range
, prefix
, narrow
, code
, width
,
height
and ...
will be ignored.
whether to debug step by step (block by block),
can also be a vector of block ids, in this case browser()
calls will be
inserted at the start of these blocks
label the edges with the number of passes