build_net {ILSM} | R Documentation |
Generating tripartite network
Description
Generating a network of three layers. All layers of network contain lay_0
, lay_1
and lay_2
nodes respectively.
Usage
build_net(lay_0, lay_1, lay_2, C_lay, asmatrices = FALSE)
Arguments
lay_0 |
The number of nodes in the first layer. |
lay_1 |
The number of nodes in the second layer. |
lay_2 |
The number of nodes in the third layer. |
C_lay |
The probability of each node interact with the other one. It ranges from 0 to 1. |
asmatrices |
Logical. whether to output the overall adjacency matrix of the network and the corresponding interaction matrix of the respective subnetworks. Defaults to FALSE. |
Value
Return a tripatite network of direction. From the first layers to the second layer and from the second layer to the third layer.
Examples
set.seed(12)
d <- build_net(11,15,16,0.2)
plot(d)
set.seed(12)
N <- build_net(11,15,16,0.2,asmatrices=FALSE)
N
[Package ILSM version 1.0.2 Index]