igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Node numbering


From: Gábor Csárdi
Subject: Re: [igraph] Node numbering
Date: Thu, 14 Mar 2013 09:41:25 -0400

No, it is not a mistake. In R nodes are numbered from 1, but in the 'edgelist' file format they are numbered from zero. This is to make sure that files are handled the same way between C, R and Python and also to make sure that old files work the same way in the new version.

In brief, this is a property of the 'edgelist' file format.

Gabor

On Thu, Mar 14, 2013 at 9:15 AM, Thomas <address@hidden> wrote:
I've just upgraded to igraph 0.6, running it in R and with the following edgelist I get the following degrees:

1  2
1  3
1  4
1  5
1  6
1  7
1  8
1  9
1  10
g <- read.graph("edgelist2.txt", format=c("edgelist"), directed=FALSE)

degree(g)
 [1] 0 9 1 1 1 1 1 1 1 1 1

So it looks like it's still expecting Node 0 in the edgelist. Is this a mistake?

Thank you,

Thomas
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



--
Gabor Csardi <address@hidden>     MTA KFKI RMKI

reply via email to

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