Learn R Programming

HEMDAG (version 2.1.3)

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

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

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

Arguments

file

name of the file to be read

Value

a graph of class graphNEL

Examples

Run this code
# NOT RUN {
edges <- system.file("extdata/edges.txt" ,package="HEMDAG");
g <- read.undirected.graph(file=edges);
# }

Run the code above in your browser using DataLab