Proportion of unreciprocated ties

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.


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.

There’s also reciprocity().

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!

Thank you @szhorvat, very much appreciated!!!