Pajek export and spaces

Bug #602587 reported by Gábor Csárdi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
igraph
Fix Released
High
Tamás Nepusz

Bug Description

Riccrdo Tasso's report:

   I have the following pajek file, wich I import in R with the usual g <- read.graph(filename, 'pajek'):

*vertices 3
1 98 "a"
2 11 "b"
3 38 "c d"
*arcs
1 2 3
2 1 1
3 1 8

Each node has a numeric attribute and a string attribute.
When I serialize my network with graph.write(g, filename, 'pajek'), I obtain a strange text file:

*Vertices 3
1 "98" a
2 "11" b
3 "38" c d
*Arcs
1 2 3
2 1 1
3 1 8

The problem is that without quotes strings with spaces give a parse error reading back the last pajek written:

Error in read.graph.pajek(file, ...) :
 At foreign.c:574 : Parse error in Pajek file, line 3 (syntax error), Parse error

Tamás Nepusz (ntamas)
Changed in igraph:
assignee: Gábor Csárdi (gabor.csardi) → Tamás Nepusz (ntamas)
status: Confirmed → In Progress
milestone: none → 0.6
Revision history for this message
Tamás Nepusz (ntamas) wrote :

FIxed in #2705 in trunk.

Changed in igraph:
status: In Progress → Fix Committed
Tamás Nepusz (ntamas)
Changed in igraph:
status: Fix Committed → Fix Released
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/73

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.