Export Diagrams

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(flow)

By default diagrams are shown in the viewer window. This might be enough, especially if you are lucky enough to have a touch screen to zoom in and out on the relevant subparts, but you might want to export your diagram to share it or to explore it more conveniently.

This is done by using the out parameter of flow_view() and flow_run().

The format will be inferred from the file extension so you might do :

library(flow)
flow_view(ave, out = "ave.png")
flow_view(ave, out = "ave.html")
flow_view(ave, out = "some_folder/ave.pdf")
flow_view(ave, out = "C:/some_folder/ave.jpeg")

If your goal is to explore rather than archive you might want to use the following shorthands, which will save the output as a temp file and open it with your default application.

flow_view(ave, out = "png")
flow_view(ave, out = "html")
flow_view(ave, out = "pdf")
flow_view(ave, out = "jpeg")


Try the flow package in your browser

Any scripts or data that you put into this service are public.

flow documentation built on June 7, 2023, 5:17 p.m.