|
From: | Prithwiraj MUKHERJEE |
Subject: | Re: [igraph] Extra vertex being read from edgelist |
Date: | Tue, 19 Nov 2013 16:38:26 +0100 |
Hiigraph edgelist files use zero-based vertex indices, so your edgelist file contains 1134 vertices since the highest vertex ID in the file is 1133. Subtract 1 from every edge ID in the file and you should be okay. (However, note that vertex indices in R start from 1, so if you have a vertex with ID=X in your file, this will be vertex X+1 in R).In case you wonder why edgelist files are zero-based: this is for sake of compatibility with edgelist files created from the raw C API of igraph or from igraph’s Python interface because those are zero-based.--T.On Tuesday, 19 November 2013 at 16:00, Prithwiraj MUKHERJEE wrote:
PrithwirajRegardsI am using igraph's latest version (i updated it today) on R 2.15.3 (64 bit) for Windows 7.On checking the graph, it has 1134 vertices (one extra vertex). Is there something I am missing?G<-read.graph("email_edges.txt", format="edgelist")HiI have attached an edgelist file "email_edges.txt". The graph has 1133 vertices. I am reading it as
_______________________________________________igraph-help mailing list
Attachments:- email_edges.txt
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |