[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Problems with Pajek file format (node attributes)
From: |
Riccardo Tasso |
Subject: |
[igraph] Problems with Pajek file format (node attributes) |
Date: |
Tue, 06 Jul 2010 18:22:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 |
Dear all,
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
Is there a way to resolve my problem?
Thank you,
Riccardo
- [igraph] Problems with Pajek file format (node attributes),
Riccardo Tasso <=