igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to prevent attribute prefixes in graphML exports?


From: Gábor Csárdi
Subject: Re: [igraph] How to prevent attribute prefixes in graphML exports?
Date: Tue, 26 Jun 2012 09:37:51 -0400

Hi Marko,

unfortunately this is fixed in the C source code, so the only way is
to modify the source code. I can make this optional, but that will be
included in the next release only, which might take some months even.

The igraph0 workaround is not bad, actually. You don't even need to
load the 'igraph0' package, just prefix the write.graph call with
'igraph0::'. E.g.

library(igraph)
igraph0::write.graph(graph.ring(10), file="/tmp/aa.graphml", format="graphml")

seems to be good, until the fix comes out. If you want to modify the
source of 0.6-1 for yourself, then update the src/foreign-graphml.c
file, and search for g_%s, v_%s and e_%s and delete the g_, v_ and e_
prefixes.

Best,
Gabor

On Mon, Jun 25, 2012 at 9:59 AM, Marko Laakso <address@hidden> wrote:
> Dear igraph fellows,
>
> We have been using igraph R-library to export GraphML files from R. The
> behaviour of write.graph() function has changed in version 0.6-2 so that it
> adds a prefix to each attribute name. Graph attributes get 'g_', vertex
> attributes 'v_', and edge attributes 'e_' prefixes. Is there a way to
> disable these prefixes so that we could preserve the original attribute
> keys?
>
> I noticed that igraph0 library can be used as a workaround but it would be
> nice to have a better solution to this.
>
> Best regards,
> Marko Laakso
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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