EVOLUTION-MANAGER
Edit File: difference.igraph.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: Difference of graphs</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 difference.igraph {igraph}"><tr><td>difference.igraph {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Difference of graphs</h2> <h3>Description</h3> <p>The difference of two graphs are created. </p> <h3>Usage</h3> <pre> ## S3 method for class 'igraph' difference(big, small, byname = "auto", ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>big</code></td> <td> <p>The left hand side argument of the minus operator. A directed or undirected graph.</p> </td></tr> <tr valign="top"><td><code>small</code></td> <td> <p>The right hand side argument of the minus operator. A directed ot undirected graph.</p> </td></tr> <tr valign="top"><td><code>byname</code></td> <td> <p>A logical scalar, or the character scalar <code>auto</code>. Whether to perform the operation based on symbolic vertex names. If it is <code>auto</code>, that means <code>TRUE</code> if both graphs are named and <code>FALSE</code> otherwise. A warning is generated if <code>auto</code> and one graph, but not both graphs are named.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Ignored, included for S3 compatibility.</p> </td></tr> </table> <h3>Details</h3> <p><code>difference</code> creates the difference of two graphs. Only edges present in the first graph but not in the second will be be included in the new graph. The corresponding operator is %m%. </p> <p>If the <code>byname</code> argument is <code>TRUE</code> (or <code>auto</code> and the graphs are all named), then the operation is performed based on symbolic vertex names. Otherwise numeric vertex ids are used. </p> <p><code>difference</code> keeps all attributes (graph, vertex and edge) of the first graph. </p> <p>Note that <code>big</code> and <code>small</code> must both be directed or both be undirected, otherwise an error message is given. </p> <h3>Value</h3> <p>A new graph object. </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> ## Create a wheel graph wheel <- union(make_ring(10), make_star(11, center=11, mode="undirected")) V(wheel)$name <- letters[seq_len(vcount(wheel))] ## Subtract a star graph from it sstar <- make_star(6, center=6, mode="undirected") V(sstar)$name <- letters[c(1,3,5,7,9,11)] G <- wheel %m% sstar print_all(G) plot(G, layout=layout_nicely(wheel)) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>