0

I'm trying to plot a graph object, and I am sure the no. of vertices = attribute value length.

ggraph(g, 'dendrogram', circular = TRUE) + 
    geom_edge_elbow() + 
    coord_fixed()

But I'm faced with the error:

Error in vertex.attributes<-(graph, index = index, value = value) : Invalid attribute value length, must match number of vertices`.

What could have gone wrong?

EDIT: Here is how g looks like.

print.igraph(g)
> IGRAPH ac1246e DN-- 27400 352542 -- 
+ attr: authority (v/n), betweenness (v/n), closeness (v/n), degree (v/n), eigenvector (v/n), hub (v/n), PaperID (v/c),
| name (v/c), na (e/l)
+ edges from ac1246e (vertex names):
 [1] 119603021->9809478   119603021->119810447 119603021->9811234   119603021->9811472   119603021->9812422   119603021->9901421  
 [7] 119603021->119902157 119603021->9903320   119603021->9905300   119603021->119905003 119603021->9906354   119603021->9310368  
[13] 119603021->9906439   119603021->9310374   119603021->9906505   119603021->9906552   119603021->119906199 119603021->9907226  
[19] 119603021->9907250   119603021->9907347   119603021->9907434   119603021->9907523   119603021->119907113 119603021->9908408  
[25] 119603021->9908477   119603021->9908484   119603021->9908514   119603021->9909229   119603021->9909561   119603021->119909141
[31] 119603021->9910251   119603021->9311327   119603021->9910428   119603021->9910438   119603021->9910443   119603021->9911358  
[37] 119603021->9911391   119603021->9911417   119603021->9911437   119603021->9912283   119603021->9912320   119603021->9912422  
+ ... omitted several edges
Grace
  • 201
  • 2
  • 13
  • 1
    Please visit [this](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – UseR10085 Jul 09 '20 at 06:34
  • `dput()` doesn't seem to work well on a large graph object, so I used `print.igraph()` and edited above post. – Grace Jul 09 '20 at 09:44

0 Answers0