Igraph.to.gexf: Cannot export graphs containing non-connected nodes
When trying to export an igraph object where some nodes have no edges rgexf fails in two ways:
1) If no positions is given the graph is exported, but without the non-connected nodes. 2) If a position is given, the following error is given:
"Error in .parseNodesVizAtt(nodesVizAtt, nodes) : Insuficient number of "nodeVizAtt" rows: The atts position (189). Every att should have the same number of rows than nodes there are (163).
I have tracked the error down to line 23 in the igraph.R file: nodes <-merge(tmpnodes,nodes, by.x="name", by.y="label")
Here only node id extracted from the edgelist is kept. I have tried to add an all.x to the merge call, but though this probably solves the issue another error is thrown.
Comments (4)
-
repo owner -
reporter I'm afraid I did not reach a fix on this issue. The code seem a bit weird in exactly this section.
-
repo owner Solved by merge https://bitbucket.org/gvegayon/rgexf/pull-requests/3/igraphtorgexf-with-disconnected-nodes/diff thanks to jaredlander
-
repo owner - changed status to resolved
- Log in to comment
When you included that fix, what was the other error thrown??
Thanks!