0

I have a very simple question. Running rgexf in R I use the code

require(rgexf)
vertices <- as.data.frame(cbind(seq(1,10),seq(1,10)))
colnames(vertices) <- c('Id','Label')
edges <- as.data.frame(cbind(c(5,1,2),c(1,1,3)))
colnames(edges) <- c('Source','Target')

to import to Gephi a graph called 'testgex.gexf' with nodes resp. edges given in vertices resp. edges. To do so I run the function

write.gexf(output='testgex.gexf',nodes=vertices,edges=edges,defaultedgetype = "undirected")

whose output in R is just

GEXF graph successfully written at:
...

where the dots are the path of 'testgex.gexf'.

I would like to visualize the XLM code behind write.gexf, instead. This is shown, for example, in @gvegayon 's answer in here or at the Bitbucket rgexf page.

How to do this?

Community
  • 1
  • 1
Avitus
  • 734
  • 2
  • 14
  • 27
  • 1
    just dont include the `output=testgexf.gexf` or you can open the .gexf file in a text editor – James Tobin Feb 26 '14 at 19:48
  • that was the secret! :) Thank you very much: please feel free to update your comment into an answer. I would gladly upvote & flag it. – Avitus Feb 26 '14 at 19:59
  • 1
    glad i could help.. this is still in regard to your import into gephi correct? maybe we should put a link between the two? not exactly sure how to do that tho =( – James Tobin Feb 26 '14 at 20:08
  • yep...you found the link :) My approach now is to have a look at the write.gexf output and try to see if there is some hint there. I spent much time to check all str(), class() etc of nodes / edges data.frames but I am still stuck. – Avitus Feb 26 '14 at 20:29

1 Answers1

1

just dont include the output=testgexf.gexf or you can open the .gexf file in a text editor

James Tobin
  • 3,070
  • 19
  • 35