reciprocity {igraph} | R Documentation |
Calculates the reciprocity of a directed graph.
reciprocity(graph, ignore.loops = TRUE)
graph |
The graph object. |
ignore.loops |
Logical constant, whether to ignore loop edges. |
A vertex pair (A, B) is said to be reciprocal if there are edges between them in both directions. The reciprocity of a directed graph is the proportion of all possible (A, B) pairs which are reciprocal, provided there is at least one edge between A and B. The reciprocity of an empty graph is undefined (results in an error code). Undirected graphs always have a reciprocity of 1.0 unless they are empty.
A numeric constaint between zero and one.
Tamas Nepusz ntamas@rmki.kfki.hu and Gabor Csardi csardi@rmki.kfki.hu
g <- random.graph.game(20, 5/20, directed=TRUE) reciprocity(g)