write.graph
From igraph v0.1.2
by Gabor Csardi
Writing the graph to a file in some format
write.graph
is a general function for exporting
graphs to foreign file formats, however not many formats are
implemented right now.
- Keywords
- graphs
Usage
write.graph(graph, file, format="edgelist", ...)
Arguments
- 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
edgelist
,lgl
andncol
are implemented. - ...
- Other, format specific arguments, see below.
Details
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.
The lgl
format is also a simple text file, this is the
format expected by the 'Large Graph Layout' layout generator software.
See read.graph for details.
Additional arguments:
- names
NULL
if you want to use numeric
vertex ids even if there is a NULL
here if you want to omit the weights.}
TRUE
the isolate vertices are
also written to the file, they are omitted by default.}
Value
- A NULL, invisibly.
code
NULL
link
itemize
- names
sQuote
- name
- name
- weights
item
weights
References
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.
See Also
Examples
g <- graph.ring(10)
write.graph(g, "/tmp/g.txt", "edgelist")
Community examples
Looks like there are no examples yet.