This is an example how we might integrate the R package igraph with the new DiagrammeR which uses htmlwidgets to allow us access to the very popular new Javascript library mermaid.js.
R
igraph
DiagrammeR
htmlwidgets
mermaid.js
code