EVOLUTION-MANAGER
Edit File: path.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: Helper function to add or delete edges along a path</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 path {igraph}"><tr><td>path {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Helper function to add or delete edges along a path</h2> <h3>Description</h3> <p>This function can be used to add or delete edges that form a path. </p> <h3>Usage</h3> <pre> path(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>See details below.</p> </td></tr> </table> <h3>Details</h3> <p>When adding edges via <code>+</code>, all unnamed arguments are concatenated, and each element of a final vector is interpreted as a vertex in the graph. For a vector of length <i>n+1</i>, <i>n</i> edges are then added, from vertex 1 to vertex 2, from vertex 2 to vertex 3, etc. Named arguments will be used as edge attributes for the new edges. </p> <p>When deleting edges, all attributes are concatenated and then passed to <code><a href="delete_edges.html">delete_edges</a></code>. </p> <h3>Value</h3> <p>A special object that can be used together with igraph graphs and the plus and minus operators. </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_edges.html">add_edges</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="vertex.html">vertex</a>()</code> </p> <h3>Examples</h3> <pre> # Create a (directed) wheel g <- make_star(11, center = 1) + path(2:11, 2) plot(g) g <- make_empty_graph(directed = FALSE, n = 10) %>% set_vertex_attr("name", value = letters[1:10]) g2 <- g + path("a", "b", "c", "d") plot(g2) g3 <- g2 + path("e", "f", "g", weight=1:2, color="red") E(g3)[[]] g4 <- g3 + path(c("f", "c", "j", "d"), width=1:3, color="green") E(g4)[[]] </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>