write_graph | R Documentation |
write_graph()
is a general function for exporting graphs to foreign
file formats, however not many formats are implemented right now.
write_graph(
graph,
file,
format = c("edgelist", "pajek", "ncol", "lgl", "graphml", "dimacs", "gml", "dot",
"leda"),
...
)
graph |
The graph to export. |
file |
A connection or a string giving the file name to write the graph to. |
format |
Character string giving the file format. Right now
|
... |
Other, format specific arguments, see below. |
A NULL, invisibly.
The edgelist
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.
Gabor Csardi csardi.gabor@gmail.com
Adai AT, Date SV, Wieland S, Marcotte EM. LGL: creating a map of protein function with an algorithm for visualizing very large biological networks. J Mol Biol. 2004 Jun 25;340(1):179-90.
read_graph()
Foreign format readers
graph_from_graphdb()
,
read_graph()
g <- make_ring(10)
file <- tempfile(fileext = ".txt")
write_graph(g, file, "edgelist")
if (!interactive()) {
unlink(file)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.