Wiki gexf file generating directions

Issue #7 resolved
viren4388 created an issue

Hi I am new in this area. I was trying to use your example to generate rgexf file but kept getting error.

> library(rgexf)
Loading required package: XML
Warning messages:
1: packagergexfwas built under R version 2.15.3 
2: packageXMLwas built under R version 2.15.3 
> people <- matrix(c(1:4, 'juan', 'pedro', 'matthew', 'carlos'),ncol=2)
> relations <- matrix(c(1,4,1,2,1,3,2,3,3,4,4,2), ncol=2, byrow=T)
> write.gexf(people, relations)
Error in nodes[[i]] : subscript out of bounds

Comments (3)

  1. George Vega Yon repo owner

    Dear viren4388,

    The problem is in the documentation. If you check the demo(gexf) it will run just fine. The only difference is that, instead of using a matrix, nodes and edges are data.frames.

    I will fix this for the next version.

    Thank you!

  2. Log in to comment