matrixtoGNAR: Converts an adjacency matrix to GNAR network

View source: R/matrixtoGNAR.R

matrixtoGNARR Documentation

Converts an adjacency matrix to GNAR network

Description

Converts an adjacency matrix to the GNARnet form for use as an input to GNAR functions.

Usage

matrixtoGNAR(input.mat)

Arguments

input.mat

an adjacency matrix whose dimension equals the number of nodes in the resulting network.

Details

The values in the $dist list are the reciprocal of the values from the weighted adjacency matrix. Any self-loops (diagonal entries) and negatively weighted edges are removed.

Value

matrixtoGNAR returns a GNARnet list with elements $edges and $dist.

Examples

#Convert fiveNet to an adjacency matrix and back again
matrixtoGNAR(as.matrix(fiveNet))

GNAR documentation built on May 29, 2024, 10:25 a.m.

Related to matrixtoGNAR in GNAR...