View source: R/as.matrix.GNARnet.R
as.matrix.GNARnet | R Documentation |
Takes an input GNARnet and neighbour stage and outputs the corresponding adjacency matrix.
## S3 method for class 'GNARnet'
as.matrix(x, stage=1, normalise=FALSE, ...)
x |
the network |
stage |
the neighbour set that the adjacency matrix is created for. |
normalise |
whether to normalise each to non-zero row to have sum one. |
... |
additional arguments, unused here. |
S3 method for class "GNARnet".
With normalisation this is a non-invertible transform. See NofNeighbours for neighbour set definition.
as.matrix
performed on a GNARnet
returns a square matrix with the number of rows and columns equal to the length of the $edges
list. Entry i,j
of the matrix will be non-zero if node j
is in the stage
neighbour set of i
.
#fiveNet as an adjacency matrix
as.matrix(fiveNet)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.