Hi all,

I’m wondering if there is a function in igraph that will calculate the proportion of ties that are unreciprocated (or reciprocated) for each vertex in the graph.

Thanks!

Hi all,

I’m wondering if there is a function in igraph that will calculate the proportion of ties that are unreciprocated (or reciprocated) for each vertex in the graph.

Thanks!

Here’s a trick you could use:

Convert the graph to undirected, keeping only reciprocal edges:

```
ug <- as.undirected(g, mode = 'mutual')
```

Then `degree(ug) / degree(g, mode = 'out')`

will give the fraction of outgoing edges that are reciprocated, for each vertex.

Indeed, but that gives a single value for the entire graph, while OP wanted a separate value for each vertex.

Ah, sorry, I missed that!