View source: R/format-mermaid.R
| write_mermaid | R Documentation |
Writes a caugi graph to a file in Mermaid format.
write_mermaid(x, file, ...)
x |
A |
file |
Path to output file. |
... |
Additional arguments passed to |
Invisibly returns the path to the file.
Other export:
caugi_deserialize(),
caugi_dot(),
caugi_export(),
caugi_graphml(),
caugi_mermaid(),
caugi_serialize(),
export-classes,
format-caugi,
format-dot,
format-graphml,
format-mermaid,
knit_print.caugi_export(),
read_caugi(),
read_graphml(),
to_dot(),
to_graphml(),
to_mermaid(),
write_caugi(),
write_dot(),
write_graphml()
cg <- caugi(
A %-->% B + C,
B %-->% D,
C %-->% D,
class = "DAG"
)
## Not run:
# Write to file
write_mermaid(cg, "graph.mmd")
# With custom direction
write_mermaid(cg, "graph.mmd", direction = "LR")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.