Skip to contents

Writes the page made by flowmap(..., html = TRUE): one self-contained HTML file (no network, no external script) with the figure, and the schematic one when there is a layout. Pointing at a place, a segment or a line of a category shows its numbers; clicking one focuses the map on the flows through it. The texts follow style$lang.

Usage

write_html(x, file)

Arguments

x

A milkflow object from flowmap().

file

Path of the file to write.

Value

file, invisibly.

Examples

m <- flowmap(demo_nodes, demo_flows, html = TRUE, style = list(lang = "en"))
f <- tempfile(fileext = ".html")
write_html(m, f)
file.size(f) > 0
#> [1] TRUE
if (interactive()) utils::browseURL(f)
unlink(f)