Draw Flow Diagrams for an Entire Package
flow_doc(
pkg = NULL,
prefix = NULL,
code = TRUE,
narrow = FALSE,
truncate = NULL,
swap = TRUE,
out = NULL,
engine = c("nomnoml", "plantuml")
)
package name as a string
prefix to use for special comments in our code used as block headers,
must start with "#"
, several prefixes can be provided
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
TRUE
makes sure the diagram stays centered on one column
(they'll be longer but won't shift to the right)
maximum number of characters to be printed per line
whether to change var <- if(cond) expr
into
if(cond) var <- expr
so the diagram displays better
path to output (.html
or .md
), if left NULL
a temp html
file will be created and opened.
either "nomnoml"
(default) or "plantuml"
(experimental), if
the latter, arguments prefix
, narrow
, and code
Returns NULL
invisibly (called for side effects).
if pkg
and out
are both left NULL
, a vignette diagrams.md
will be built
in the root, so that pkgdown::build_site
will use it as an additional page.
See also the vignette "Build reports to document functions and unit tests".