read.undirected.graph: Read an undirected graph from a file

Description Usage Arguments Value Examples

View source: R/IO.fun.R

Description

The graph is read from a file and a graphNEL object is built. The format of the input file is a sequence of rows. Each row corresponds to an edge represented through a pair of vertices separated by blanks, and the weight of the edge.

Usage

1
read.undirected.graph(file = "graph.txt.gz")

Arguments

file

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

Value

a graph of class graphNEL.

Examples

1
2
edges <- system.file("extdata/edges.txt.gz", package="HEMDAG");
g <- read.undirected.graph(file=edges);

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