matrixtoGNAR: Converts an adjacency matrix to GNAR network

Description Usage Arguments Details Value Examples

View source: R/matrixtoGNAR.R

Description

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

Usage

1
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.

Value

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

Examples

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

nunesmatt/GNAR documentation built on Oct. 29, 2019, 4:25 p.m.