title: How to use GraphViz graphs in DiagrammeR for R
body: <p>I am trying to use a GraphViz graph in DiagrammeR. How can I do this?</p>
  
  <pre><code>myGraph = grViz("
  digraph boxes_and_circles {
  
    # a 'graph' statement
    graph [overlap = true, fontsize = 10]
  
    # several 'node' statements
    node [shape = box,
          fontname = Helvetica]
    A; B; C; D; E; F
  
    node [shape = circle,
          fixedsize = true,
          width = 0.9] // sets as circles
    1; 2; 3; 4; 5; 6; 7; 8
  
    # several 'edge' statements
    A-&gt;1 B-&gt;2 B-&gt;3 B-&gt;4 C-&gt;A
    1-&gt;D E-&gt;A 2-&gt;4 1-&gt;5 1-&gt;F
    E-&gt;6 4-&gt;6 5-&gt;7 6-&gt;7 3-&gt;8
  }
  ")
  </code></pre>
  
  <p>and then I want to use it in DiagrammeR, but it will not allow it.</p>
  
  <pre><code>render_graph(myGraph)
  </code></pre>
  
  <p>Gives:</p>
  
  <pre><code>Error: class(graph) == "dgr_graph" are not all TRUE
  </code></pre>
  
  <p>Is there a way I need to convert or input the GraphViz graph into the DiagrammeR environment?</p>