EVOLUTION-MANAGER
Edit File: degree.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: Degree and degree distribution of the vertices</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 degree {igraph}"><tr><td>degree {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Degree and degree distribution of the vertices</h2> <h3>Description</h3> <p>The degree of a vertex is its most basic structural property, the number of its adjacent edges. </p> <h3>Usage</h3> <pre> degree( graph, v = V(graph), mode = c("all", "out", "in", "total"), loops = TRUE, normalized = FALSE ) degree_distribution(graph, cumulative = FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to analyze.</p> </td></tr> <tr valign="top"><td><code>v</code></td> <td> <p>The ids of vertices of which the degree will be calculated.</p> </td></tr> <tr valign="top"><td><code>mode</code></td> <td> <p>Character string, “out” for out-degree, “in” for in-degree or “total” for the sum of the two. For undirected graphs this argument is ignored. “all” is a synonym of “total”.</p> </td></tr> <tr valign="top"><td><code>loops</code></td> <td> <p>Logical; whether the loop edges are also counted.</p> </td></tr> <tr valign="top"><td><code>normalized</code></td> <td> <p>Logical scalar, whether to normalize the degree. If <code>TRUE</code> then the result is divided by <i>n-1</i>, where <i>n</i> is the number of vertices in the graph.</p> </td></tr> <tr valign="top"><td><code>cumulative</code></td> <td> <p>Logical; whether the cumulative degree distribution is to be calculated.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments to pass to <code>degree</code>, eg. <code>mode</code> is useful but also <code>v</code> and <code>loops</code> make sense.</p> </td></tr> </table> <h3>Value</h3> <p>For <code>degree</code> a numeric vector of the same length as argument <code>v</code>. </p> <p>For <code>degree_distribution</code> a numeric vector of the same length as the maximum degree plus one. The first element is the relative frequency zero degree vertices, the second vertices with degree one, etc. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>Examples</h3> <pre> g <- make_ring(10) degree(g) g2 <- sample_gnp(1000, 10/1000) degree_distribution(g2) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>