title: How to rearrange diagram in R
body: <p>I updated my <code>diagrammer</code> to version 0.9.0 and started rendering different diagram from the same data. My data frame now looks like this:</p>
  <pre><code>df &lt;- data.frame(col1 = c( &quot;Cat&quot;, &quot;Dog&quot;, &quot;Bird&quot;),
                   col2 = c( &quot;Feline&quot;, &quot;Canis&quot;, &quot;Avis&quot;), 
                   stringsAsFactors=FALSE)
  </code></pre>
  <p>The rest of code looks like this:</p>
  <pre><code>uniquenodes &lt;- unique(c(df$col1, df$col2))
  library(DiagrammeR)
  nodes &lt;- create_node_df(n=length(uniquenodes), nodes = seq(uniquenodes),  type=&quot;number&quot;, label=uniquenodes)
  edges &lt;- create_edge_df(from=match(df$col1, uniquenodes), to=match(df$col2, uniquenodes), rel=&quot;related&quot;)
  
  g &lt;- create_graph(nodes_df=nodes, edges_df=edges)
  render_graph(g)
  </code></pre>
  <p>When code is used I get this diagram:</p>
  <p><a href="https://i.stack.imgur.com/Lz53v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lz53v.png" alt="enter image description here" /></a></p>
  <p>When it should look like this:</p>
  <p><a href="https://i.stack.imgur.com/ZOSRA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZOSRA.png" alt="enter image description here" /></a></p>