weighted.adjacency.matrix: Weighted adjacency matrix

Description Usage Arguments Value Examples

View source: R/graph.utility.R

Description

Build a symmetric 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 vertexes (blank separated) and the weight of the edges. For instance: nodeX nodeY score. The file extension can be plain (".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);

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.