[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Accessing elements
From: |
Gabor Csardi |
Subject: |
Re: [igraph] Accessing elements |
Date: |
Fri, 7 Mar 2008 12:36:21 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi, this is intentional and yes, it is confusing. The solution
would be using 1-based indexing for vertex and edge ids in igraph,
but this is not trivial and will break almost all the existing R code.
Or the other solution would be to just change the indexing of
V(g), but that would be also confusing, since V(g)[1] would mean
vertex 0.
Something will be done, maybe in the next major release, but
i haven't decided yet.
Gabor
On Fri, Mar 07, 2008 at 04:38:07PM +0530, Rushi Bhatt wrote:
> Hi,
>
> In the R package, for a graph g
>
> V(g)$name[1] is not the same as V(g)[1]$name, which leads to confusion (at
> least to me!). 0-based indexing (internally) is the culprit, I think.
>
> Any way this can be fixed?
>
> Thanks,
> Rushi
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <address@hidden> UNIL DGM