Learn R Programming

DiagrammeRsvg (version 0.1)

export_svg: Export grViz graph as SVG with V8

Description

Use viz.js with V8 to get the diagram rendered as SVG in R instead of the browser.

Usage

export_svg(gv)

Arguments

gv
htmlwidget to render as SVG.

Value

string of SVG XML text.

Examples

Run this code
## Not run: 
#  library(DiagrammeR)
#  svg <- export_svg(grViz('digraph{a->b; c->a; c->b; c->d;}'))
# 
#  # this can then be used with htmltools and can save significantly
#  # on size of output using svg rather than unrendered grViz
#  library(htmltools)
#  html_print(HTML(svg))
# ## End(Not run)

Run the code above in your browser using DataLab