EVOLUTION-MANAGER
Edit File: graph_from_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: Create a graph from an edge list matrix</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 graph_from_edgelist {igraph}"><tr><td>graph_from_edgelist {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a graph from an edge list matrix</h2> <h3>Description</h3> <p><code>graph_from_edgelist</code> creates a graph from an edge list. Its argument is a two-column matrix, each row defines one edge. If it is a numeric matrix then its elements are interpreted as vertex ids. If it is a character matrix then it is interpreted as symbolic vertex names and a vertex id will be assigned to each name, and also a <code>name</code> vertex attribute will be added. </p> <h3>Usage</h3> <pre> graph_from_edgelist(el, directed = TRUE) from_edgelist(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>el</code></td> <td> <p>The edge list, a two column matrix, character or numeric.</p> </td></tr> <tr valign="top"><td><code>directed</code></td> <td> <p>Whether to create a directed graph.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed to <code>graph_from_edgelist</code>.</p> </td></tr> </table> <h3>Value</h3> <p>An igraph graph. </p> <h3>See Also</h3> <p>Other deterministic constructors: <code><a href="graph_from_atlas.html">graph_from_atlas</a>()</code>, <code><a href="graph_from_literal.html">graph_from_literal</a>()</code>, <code><a href="make_chordal_ring.html">make_chordal_ring</a>()</code>, <code><a href="make_empty_graph.html">make_empty_graph</a>()</code>, <code><a href="make_full_citation_graph.html">make_full_citation_graph</a>()</code>, <code><a href="make_full_graph.html">make_full_graph</a>()</code>, <code><a href="make_graph.html">make_graph</a>()</code>, <code><a href="make_lattice.html">make_lattice</a>()</code>, <code><a href="make_ring.html">make_ring</a>()</code>, <code><a href="make_star.html">make_star</a>()</code>, <code><a href="make_tree.html">make_tree</a>()</code> </p> <h3>Examples</h3> <pre> el <- matrix( c("foo", "bar", "bar", "foobar"), nc = 2, byrow = TRUE) graph_from_edgelist(el) # Create a ring by hand graph_from_edgelist(cbind(1:10, c(2:10, 1))) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>