edgelist_to_adj: Convert edgelist and edgeweight to adjacency matrix.

View source: R/utils.R

edgelist_to_adjR Documentation

Convert edgelist and edgeweight to adjacency matrix.

Description

Convert edgelist and edgeweight to adjacency matrix.

Usage

edgelist_to_adj(edgelist, edgeweight, directed = TRUE)

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.

Value

Returns an adjacency matrix.


wdnet documentation built on May 29, 2024, 9:32 a.m.