weighted.adjacency.matrix: Weighted Adjacency Matrix

Description Usage Arguments Value Examples

View source: R/graph.utility.R

Description

Construct a Weighted Adjacency Matrix (wadj matrix) of a graph.

Usage

1

Arguments

file

name of the plain text file to be read (def. edges). The format of the 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 edges. For instance: nodeX nodeY score. The file extension can be or plain format (".txt") or compressed (".gz").

Value

a named symmetric weighted adjacency matrix of the graph.

Examples

1
2
edges <- system.file("extdata/edges.txt.gz", package="HEMDAG");
W <- weighted.adjacency.matrix(file=edges);

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