[Top][All Lists]

[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: lan gao
Subject: Re: [igraph] How to read a graph data with non numeric vertex ID
Date: Thu, 4 Sep 2008 09:36:54 -0500

Thank you so much. I see the problem...my file is a txt file.  Can you please how to store a file in ncol format?

On Wed, Sep 3, 2008 at 9:56 AM, Tamas Nepusz <address@hidden> wrote:
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

[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"


igraph-help mailing list

reply via email to

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