title: Converting grViz objects to DiagrammeR objects
body: <p>The function <code>DiagrammeR::grViz()</code> produces an object of class &quot;grViz&quot; and &quot;htmlwidget&quot;. Unfortunately, most functions in <code>DiagrammeR</code> assume your graph is a <code>drg_graph</code> object and so you cannot simply pass the output of <code>grViz</code> to those functions.</p>
  <p>Is there some way to convert the type of the object so as to use the functions from <code>DiagrammeR</code>, such as features to combine two graphs into one file or save the graph with specified dimensions and formatting?</p>
  <pre><code>library(DiagrammeR)
  
  # Make graph
  simple &lt;- grViz(&quot;
  digraph dot {
  
      # Graph statements
      graph [layout = dot, overlap = false]
  
      # Node statements
      node [shape = box, fontname = Helvetica]
      a
      b
      e
  
      # Edge statements
      a -&gt; b;
      b -&gt; e;
  } 
  &quot;)
  
  # Check class
  class(simple)
  </code></pre>