make_SW | R Documentation |
Make an already existing network according to the Small-World mechanism.
make_SW(size, rewire, neighborhood, net_kind = "matrix", directed = FALSE)
size |
The number of nodes in the network. Must be a positive integer. |
rewire |
Small-World parameter specifying the probability each edge is randomly rewired, allowing for the possiblity of bridges between connected communities. |
neighborhood |
The range of nodes that form connected communities. Note: This implementation results in overlap of communities. |
net_kind |
The format of the network. Currently must be either 'matrix' or 'list'.x |
directed |
Binary variable determining if the network is directed, resulting in off-diagonal asymmetry in the adjacency matrix. Defaults to TRUE. |
Rewires a node in a network according to the Small-World mechanism.
An adjacency matrix.
Watts, D. J., & Strogatz, S. H. (1998). Collective dynamics of ‘small-world’networks. nature, 393(6684), 440-442.
# Import netcom library(netcom) # Network size (number of nodes) size <- 10 # Rewiring parameter rewire <- 0.2 # Make network according to the Small-World mechanism make_SW(size = size, net_kind = "matrix", rewire = rewire)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.