如果您从 R 中使用 igraph,请使用此选项
write_graph {igraph} | R 文档 |
write_graph
是一个将图导出为外部文件格式的通用函数,但目前实现的格式不多。
write_graph(
graph,
file,
format = c("edgelist", "pajek", "ncol", "lgl", "graphml", "dimacs", "gml", "dot",
"leda"),
...
)
图 |
要导出的图。 |
file |
连接或给出要写入图的文件名的字符串。 |
format |
给出文件格式的字符串。 目前实现了 |
... |
其他,格式特定的参数,见下文。 |
一个 NULL,不可见。
edgelist
格式是一个简单的文本文件,每行一条边,两个顶点 ID 用空格字符分隔。 该文件按第一列和第二列排序。 此格式没有其他参数。
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.
g <- make_ring(10)
## Not run: write_graph(g, "/tmp/g.txt", "edgelist")