EVOLUTION-MANAGER
Edit File: add_edges.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: Add edges to a graph</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 add_edges {igraph}"><tr><td>add_edges {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add edges to a graph</h2> <h3>Description</h3> <p>The new edges are given as a vertex sequence, e.g. internal numeric vertex ids, or vertex names. The first edge points from <code>edges[1]</code> to <code>edges[2]</code>, the second from <code>edges[3]</code> to <code>edges[4]</code>, etc. </p> <h3>Usage</h3> <pre> add_edges(graph, edges, ..., attr = list()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The input graph</p> </td></tr> <tr valign="top"><td><code>edges</code></td> <td> <p>The edges to add, a vertex sequence with even number of vertices.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments, they must be named, and they will be added as edge attributes, for the newly added edges. See also details below.</p> </td></tr> <tr valign="top"><td><code>attr</code></td> <td> <p>A named list, its elements will be added as edge attributes, for the newly added edges. See also details below.</p> </td></tr> </table> <h3>Details</h3> <p>If attributes are supplied, and they are not present in the graph, their values for the original edges of the graph are set to <code>NA</code>. </p> <h3>Value</h3> <p>The graph, with the edges (and attributes) added. </p> <h3>See Also</h3> <p>Other functions for manipulating graph structure: <code><a href="plus-.igraph.html">+.igraph</a>()</code>, <code><a href="add_vertices.html">add_vertices</a>()</code>, <code><a href="delete_edges.html">delete_edges</a>()</code>, <code><a href="delete_vertices.html">delete_vertices</a>()</code>, <code><a href="edge.html">edge</a>()</code>, <code><a href="igraph-minus.html">igraph-minus</a></code>, <code><a href="path.html">path</a>()</code>, <code><a href="vertex.html">vertex</a>()</code> </p> <h3>Examples</h3> <pre> g <- make_empty_graph(n = 5) %>% add_edges(c(1,2, 2,3, 3,4, 4,5)) %>% set_edge_attr("color", value = "red") %>% add_edges(c(5,1), color = "green") E(g)[[]] plot(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>