> I'd like to set the size of node proportionally to the mean value of
> the importance that is given to a node by its neighborhood. I am on R
> with igraph 0.5.5-4.
>
> How to retrieve the importance value of the in-links of a node?
Try this:
al <- get.adjlist(g, mode="in")
V(g)$size <- unlist(lapply(al, function (vs) { mean(V(g)$importance[vs+1] }))
Note the +1 in the indexing, which accounts for the zero-based igraph vertex
indices.
Best,
T.
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help