fc_export {flowchart} | R Documentation |
fc_export
Description
This function allows you to export the drawn flowchart to the most popular graphic devices (png, jpeg, tiff, bmp).
Usage
fc_export(
object,
filename,
path = NULL,
format = NULL,
width = NA,
height = NA,
units = "px",
res = 100
)
Arguments
object |
fc object that we want to export. |
filename |
File name to create on disk. |
path |
Path of the directory to save plot to: path and filename are combined to create the fully qualified file name. Defaults to the working directory. |
format |
Name of the graphic device. One of 'png', 'jpeg', 'tiff' or 'bmp'. If NULL (default), the format is guessed based on the filename extension. |
width , height |
Plot size in units expressed by the 'units' argument. Default is 600px. |
units |
One of the following units in which the width and height arguments are expressed: "in", "cm", "mm" or "px". Default is "px". |
res |
The nominal resolution in ppi which will be recorded in the bitmap file, if a positive integer. Also used for units other than the default, and to convert points to pixels. Default is 100. |
Value
Invisibly returns the same object that has been given to the function.
Examples
## Not run:
safo |>
as_fc(label = "Patients assessed for eligibility") |>
fc_filter(!is.na(group), label = "Randomized", show_exc = TRUE) |>
fc_draw() |>
fc_export("flowchart.png")
#Specifying size and resolution
safo |>
as_fc(label = "Patients assessed for eligibility") |>
fc_filter(!is.na(group), label = "Randomized", show_exc = TRUE) |>
fc_draw() |>
fc_export("flowchart.png", width = 2500, height = 2000, res = 700)
## End(Not run)