grVizToPNG
Export a grViz object into a PNG file.
grVizToPNG(g, width = NULL, height = NULL, folder = ".")
an object produced by the grViz function from the DiagrammmeR package
the width in pixels of the bitmap
the height in pixels of the bitmap
path to folder where the PNG file should stored
Returns the full path of the PNG file.
First the grViz object is exported to an SVG file (using DiagrammeRsvg::export_svg
).
Then the SVG file is converted to a bitmap (using rsvg::rsvg
).
Then the bitmap is exported as a PNG file (using png::writePNG
).
Note that the SVG file and the PNG file will be named using the name of the g
parameter