write.graph: Write a directed graph on file

Description Usage Arguments Value Examples

View source: R/IO.fun.R

Description

An object of class graphNEL is read and the graph is written on a plain text file as sequence of rows.

Usage

1
write.graph(g, file = "graph.txt.gz")

Arguments

g

a graph of class graphNEL.

file

name of the file to be written. The extension of the file can be or plain format (".txt") or compressed (".gz").

Value

a plain text file representing the graph. Each row corresponds to an edge represented through a pair of vertices separated by blanks.

Examples

1
2
3
4
data(graph);
tmpdir <- paste0(tempdir(),"/");
file <- paste0(tmpdir,"graph.edges.txt.gz");
write.graph(g, file=file);

gecko515/HEMDAG documentation built on Oct. 18, 2019, 6:34 a.m.