title: how to use circle pack layout in ggraph library in r
body: <p>what data format is necessary to create ggraph circlepack layout? It seems to require a hierarchy.</p>
  
  <p>I tried normally vertices and nodes, which apparently doesn't work.</p>
  
  <pre><code>library(ggraph)
  library(igraph)
  edges=data.frame(from=c('a','b','c'), to= c('c','a','d'))
  vertices=data.frame(nodes=c('a','b','c','d'), weight=c(1,2,3,4))
  graph &lt;- graph_from_data_frame(edges, vertices = vertices)
  ggraph(graph, 'circlepack', weight = 'size') + 
  geom_node_circle(size = 0.25, n = 50) + 
  coord_fixed()
  </code></pre>
  
  <p>I then tried a dendrogram object which doesn't work either.
  If i want to show several groups with sub-items in packed circle, how shall i build the graph object?</p>
  
  <p>the data frame is more like this</p>
  
  <pre><code>df &lt;- data.frame(group=c("a","a","b","b","b"),    subitem=c("x","y","z,"u","v"), size=c(6,2,3,2,5))
  </code></pre>