Learn R Programming

wdnet (version 1.2.3)

edgelist_to_adj: Convert edgelist and edgeweight to adjacency matrix.

Description

Convert edgelist and edgeweight to adjacency matrix.

Usage

edgelist_to_adj(edgelist, edgeweight, directed = TRUE)

Value

Returns an adjacency matrix.

Arguments

edgelist

A two column matrix representing edges.

edgeweight

A vector representing the weight of edges. If NULL, all edges are considered to have a weight of 1.

directed

Logical, whether the network is directed.