igraph-help
[Top][All Lists]
Advanced

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

[igraph] GraphML graph format


From: Massimo Franceschet
Subject: [igraph] GraphML graph format
Date: Thu, 27 Nov 2014 16:27:29 +0100

I am using igraph "0.7.1" from R interface. I noticed that when I read a graph 
in GraphML, an additional id attribute is created for nodes in the igraph 
graph, even if there exists no GraphML id attribute for nodes. This might 
create problems if there exists already an id attribute for nodes in the igraph 
graph. An example follows.

Best,

Massimo

# load igraph
library(igraph)

# create a ring graph
g = graph.ring(10)

# create id attribute
V(g)$id = 1:vcount(g)

# save the graph in GraphML
write.graph(g, file="ring.xml", format="graphml")

# read the graph
g = read.graph(file="ring.xml", format="graphml")

Warning message:
  In .Call("R_igraph_read_graph_graphml", file, as.numeric(index),  :
             At foreign-graphml.c:443 :Could not add vertex ids, there is 
already an 'id' vertex attribute





reply via email to

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