igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to read a graph data with non numeric vertex ID


From: Tamas Nepusz
Subject: Re: [igraph] How to read a graph data with non numeric vertex ID
Date: Wed, 3 Sep 2008 15:56:54 +0100

Thanks for your prompt reply. I tried NCOL format, it was still not working...
It works perfectly for me. I stored the snippet you sent in a file called test.ncol, then I did the following in R:

> library(igraph)
> g <- read.graph("test.ncol", format="ncol")
> g
Vertices: 10
Edges: 10
Directed: FALSE
Edges:

[0] DIP:2551N -- DIP:1189N
[1] DIP:2551N -- DIP:1330N
[2] DIP:2551N -- DIP:4449N
[3] DIP:2551N -- DIP:2425N
[4] DIP:1189N -- DIP:6289N
[5] DIP:6289N -- DIP:5008N
[6] DIP:6289N -- DIP:1361N
[7] DIP:6289N -- DIP:963N
[8] DIP:2425N -- DIP:6289N
[9] DIP:6289N -- DIP:2068N
> V(g)$name
[1] "DIP:2551N" "DIP:1189N" "DIP:1330N" "DIP:4449N" "DIP:2425N" "DIP: 6289N"
 [7] "DIP:5008N" "DIP:1361N" "DIP:963N"  "DIP:2068N"

--
Tamas





reply via email to

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