| matrixtoGNAR | R Documentation |
Converts an adjacency matrix to the GNARnet form for use as an input to GNAR functions.
matrixtoGNAR(input.mat)
input.mat |
an adjacency matrix whose dimension equals the number of nodes in the resulting network. |
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.
matrixtoGNAR returns a GNARnet list with elements $edges and $dist.
#Convert fiveNet to an adjacency matrix and back again
matrixtoGNAR(as.matrix(fiveNet))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.