|
From: | Gábor Csárdi |
Subject: | Re: [igraph] degrees of separation |
Date: | Tue, 21 May 2013 12:57:50 -0400 |
Hello,I am a new R and igraph user and I am wondering whether you could give me some hints to do the following:
I have an edgelist (undirected). I would like to compute the following four things:- for a subset of vertices, the number of edges (without counting twice a same vertex linked with two different vertices of the subset)
- for a subset of vertices, if at least one of the vertices from this subset is linked with a particular vertex (from the whole set)
- for a subset of vertices, the minimal degree of separation required to reach a particular vertex (from the whole set)
- for all the vertices (in the whole set), if they are linked with at least one vertex from the subset
For example:1-21-32-32-53-43-54-5and consider the subset of vertices being 1 and 2 and the particular vertex being 4Answer to the first question: 3 (edges 1-3 and 2-3 are count only for one)Answer to the second question: 0 (neither 1, neither 2 is directly linked to 4)Answer to the third question: 2 (edge 1-3 and then edge 3-4 or edge 2-3 and then edge 3-4)Answer to the fourth question: [1] - [2] - [3] 1 [4] 0 [5] 1Many thanks for your help!
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |