EVOLUTION-MANAGER
Edit File: write_graph.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: Writing the graph to a file in some format</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 write_graph {igraph}"><tr><td>write_graph {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Writing the graph to a file in some format</h2> <h3>Description</h3> <p><code>write_graph</code> is a general function for exporting graphs to foreign file formats, however not many formats are implemented right now. </p> <h3>Usage</h3> <pre> write_graph( graph, file, format = c("edgelist", "pajek", "ncol", "lgl", "graphml", "dimacs", "gml", "dot", "leda"), ... ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to export.</p> </td></tr> <tr valign="top"><td><code>file</code></td> <td> <p>A connection or a string giving the file name to write the graph to.</p> </td></tr> <tr valign="top"><td><code>format</code></td> <td> <p>Character string giving the file format. Right now <code>pajek</code>, <code>graphml</code>, <code>dot</code>, <code>gml</code>, <code>edgelist</code>, <code>lgl</code>, <code>ncol</code> and <code>dimacs</code> are implemented. As of igraph 0.4 this argument is case insensitive.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other, format specific arguments, see below.</p> </td></tr> </table> <h3>Value</h3> <p>A NULL, invisibly. </p> <h3>Edge list format</h3> <p>The <code>edgelist</code> format is a simple text file, with one edge in a line, the two vertex ids separated by a space character. The file is sorted by the first and the second column. This format has no additional arguments. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Adai AT, Date SV, Wieland S, Marcotte EM. LGL: creating a map of protein function with an algorithm for visualizing very large biological networks. <em>J Mol Biol.</em> 2004 Jun 25;340(1):179-90. </p> <h3>See Also</h3> <p><code><a href="read_graph.html">read_graph</a></code> </p> <h3>Examples</h3> <pre> g <- make_ring(10) ## Not run: write_graph(g, "/tmp/g.txt", "edgelist") </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>