I have a mathematica generated network which I would like to fit into a power-law using R igraph package but i don't know which export format to use .
Many thanks.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityUpdate: IGraph/M now has a standards-compliant GraphML exporter. It produces files that will load in R/igraph without problems.
<<IGraphM`
IGExport["mygraph.graphml", g]
The GraphML files produced by the built-in Export
function are not standard-compliant and will not load in many other programs.
I don't have experience with this, but you can still compare Mathematica format's with R/igraph's:
From http://igraph.org/r/doc/read_graph.html:
format
Character constant giving the file format. Right now as_edgelist, pajek, graphml, gml, ncol, lgl, dimacs and graphdb are supported, the default is edgelist.
From http://reference.wolfram.com/language/guide/MathematicalDataFormats.html:
Not every format is fully supported.
Of the formats that Mathematica has built-in support for, I recommend using GML. As of M11.2, this seems to have the most robust implementation.
temp = RandomGraph[{5, 8}]; Export["test.dat", List @@@ EdgeList[temp]]
will give such a file. $\endgroup$