igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] smooth interaction between igraph/R and networkx/python


From: Bob Pap
Subject: Re: [igraph] smooth interaction between igraph/R and networkx/python
Date: Thu, 6 Dec 2012 15:11:46 +0100

Hi Tamás,
As you said, there does not seem to be easy choices other then automatising at the filesystem level (saving hundreds of graphs from R, processing hundreds of graphs in python while writing them, and reading the hundreds of graphs from R again. Oh well.

Examples of the faulty networks are enclosed. The errors I get are

> g_new <- read.graph(MyFile("folder", "data", "g_new.gml"),"gml")

Error in read.graph.gml(file, ...) : 

  At foreign.c:1114 : Parse error in GML file, line 1 (syntax error, unexpected LISTCLOSE, expecting KEYWORD), Parse error

> g_new <- read.graph(MyFile("folder", "data", "g_new.net"),"pajek")

Error in read.graph.pajek(file, ...) : 

  At foreign.c:578 : Parse error in Pajek file, line 1 (syntax error, unexpected ALNUM), Parse error

> g_new <- read.graph(MyFile("interbank", "data", "g_new.graphml"),"graphml")



On 6 December 2012 12:06, Tamas Nepusz <address@hidden> wrote:
> forth (incidentally, igraph is not able to read the gml and pajek graphs
> exported from networkx).
Can you please send me a few example graphs produced by NetworkX that cannot
be read by igraph?

> However, a bit ahead I am going to have to do the back-and-forth between
> igraph/R and networkx/python for many graphs. Is anybody familiar with
> tricks to implement this in code?
The only trick that comes into my mind is that if you want to avoid having
to jump back and forth between an R console and a Python console, you could
try RPy (http://rpy.sourceforge.net), which aims to bridge the gap between
the two languages. Note that R and Python still live in their separate
worlds, RPy just gives you tools to pass basic variables between them.
(Passing igraph graphs directly won't work, though).

--
T.

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

Attachment: g_new.gml
Description: Binary data

Attachment: g_new.graphml
Description: Binary data

Attachment: g_new.net
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]