[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] listing edges connecting nodes with same attributes
From: |
Luca Rossi |
Subject: |
[igraph] listing edges connecting nodes with same attributes |
Date: |
Tue, 11 Oct 2016 09:52:27 +0000 |
Hello,
I’m sure this is a very simple question but for some reason I can’t figure out
how to do it.
I need to list all the edges connecting nodes with a specific attribute. (e.g.
nodes can be “red” or “green”). So i want to now how many dyads red-red,
red-green, green-green.
I’ve tried with edge_connectivity but it doesn’t work when source and target
are the same node (as it happens in this case:
edge_connectivity(g,source = V(g)[V(g)$color == "green"],target =
V(g)[V(g)$color=="green”])
is there any way to do this?
Thank you !
Luca
- [igraph] listing edges connecting nodes with same attributes,
Luca Rossi <=