EVOLUTION-MANAGER
Edit File: as_edgelist.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: Convert a graph to an edge list</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 as_edgelist {igraph}"><tr><td>as_edgelist {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert a graph to an edge list</h2> <h3>Description</h3> <p>Sometimes it is useful to work with a standard representation of a graph, like an edge list. </p> <h3>Usage</h3> <pre> as_edgelist(graph, names = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to convert.</p> </td></tr> <tr valign="top"><td><code>names</code></td> <td> <p>Whether to return a character matrix containing vertex names (ie. the <code>name</code> vertex attribute) if they exist or numeric vertex ids.</p> </td></tr> </table> <h3>Details</h3> <p><code>as_edgelist</code> returns the list of edges in a graph. </p> <h3>Value</h3> <p>A <code>gsize(graph)</code> by 2 numeric matrix. </p> <h3>See Also</h3> <p><code><a href="graph_from_adjacency_matrix.html">graph_from_adjacency_matrix</a></code>, <code><a href="read_graph.html">read_graph</a></code> </p> <h3>Examples</h3> <pre> g <- sample_gnp(10, 2/10) as_edgelist(g) V(g)$name <- LETTERS[seq_len(gorder(g))] as_edgelist(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>