# 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)
Run the code above in your browser using DataLab