[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] extracting lists
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] extracting lists |
Date: |
Mon, 26 Jan 2009 23:56:51 +0100 |
On Mon, Jan 26, 2009 at 10:23 PM, Thiago M. Venancio
<address@hidden> wrote:
> Hi all,
>
> After loading the graph in R, I would like to extract the list with vertices
> names and their degrees.
> I know how to save both variables in vectors, however they seem to be in
> different orders. For example, the degree of the first element in the vector
> with vertices names is not allocated in the first position in the degree
> vector.
> Here is what I am doing:
>
> graph = read.graph("graph.txt", format="ncol")
> deg = degree(graph)
> vec = V(graph)
Hi,
it is hard to guess what is in 'graph.txt', but 'deg' and 'vec' are
"in order" here, i.e. deg[1] belongs to vec[1], etc.
You need to give us a reproducible example to see what goes wrong for you.
Gabor
> Any help is appreciated.
>
> Best,
>
> Thiago
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <address@hidden> UNIL DGM
- [igraph] extracting lists, Thiago M. Venancio, 2009/01/26
- Re: [igraph] extracting lists,
Gábor Csárdi <=
- Re: [igraph] extracting lists, Thiago M. Venancio, 2009/01/26
- Re: [igraph] extracting lists, Gábor Csárdi, 2009/01/27
- Re: [igraph] extracting lists, Thiago M. Venancio, 2009/01/27
- Re: [igraph] extracting lists, Gábor Csárdi, 2009/01/27
- Re: [igraph] extracting lists, Thiago M. Venancio, 2009/01/27
- Re: [igraph] extracting lists, Gábor Csárdi, 2009/01/27