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

Description Usage Arguments Value Examples

View source: R/graph.utility.R

Description

Read a graph from a file and build a graphNEL object. The format of the input file is a sequence of rows. Each row corresponds to an edge represented through a pair of vertexes (blank separated) 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 plain (".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);

Example output

HEMDAG: Hierarchical Ensemble Methods for DAG-structured taxonomies
Please cite HEMDAG if you use it: see citation('HEMDAG') for details

HEMDAG documentation built on Feb. 12, 2021, 5:13 p.m.