EVOLUTION-MANAGER
Edit File: reciprocity.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Reciprocity of graphs</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for reciprocity {igraph}"><tr><td>reciprocity {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Reciprocity of graphs</h2> <h3>Description</h3> <p>Calculates the reciprocity of a directed graph. </p> <h3>Usage</h3> <pre> reciprocity(graph, ignore.loops = TRUE, mode = c("default", "ratio")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph object.</p> </td></tr> <tr valign="top"><td><code>ignore.loops</code></td> <td> <p>Logical constant, whether to ignore loop edges.</p> </td></tr> <tr valign="top"><td><code>mode</code></td> <td> <p>See below.</p> </td></tr> </table> <h3>Details</h3> <p>The measure of reciprocity defines the proportion of mutual connections, in a directed graph. It is most commonly defined as the probability that the opposite counterpart of a directed edge is also included in the graph. Or in adjacency matrix notation: <i>sum(i, j, (A.*A')ij) / sum(i, j, Aij)</i>, where <i>A.*A'</i> is the element-wise product of matrix <i>A</i> and its transpose. This measure is calculated if the <code>mode</code> argument is <code>default</code>. </p> <p>Prior to igraph version 0.6, another measure was implemented, defined as the probability of mutual connection between a vertex pair, if we know that there is a (possibly non-mutual) connection between them. In other words, (unordered) vertex pairs are classified into three groups: (1) not-connected, (2) non-reciprocally connected, (3) reciprocally connected. The result is the size of group (3), divided by the sum of group sizes (2)+(3). This measure is calculated if <code>mode</code> is <code>ratio</code>. </p> <h3>Value</h3> <p>A numeric scalar between zero and one. </p> <h3>Author(s)</h3> <p>Tamas Nepusz <a href="mailto:ntamas@gmail.com">ntamas@gmail.com</a> and Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>Examples</h3> <pre> g <- sample_gnp(20, 5/20, directed=TRUE) reciprocity(g) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>