# Import netcom
library(netcom)
# Start by creating a sequence of network evolutions.
# There are four components to this sequence that can each be defined for every step
# in the network's evolution. Or, you can also specify a component once which will
# be used for every step in the newtwork's evolution.
mechanism <- c(
rep("ER", 7),
rep("PA", 2),
rep("ER", 3)
)
kind <- c(
rep("grow", 7),
rep("rewire", 2),
rep("grow", 3)
)
parameter <- c(
rep(0.3, 7),
rep(2, 2),
rep(0.3, 3)
)
directed <- c(
rep(TRUE, 7),
rep(FALSE, 2),
rep(TRUE, 3)
)
# Simulate a network according to the rules of this system evolution.
network <- make_Mixture(
mechanism = mechanism,
kind = kind,
parameter = parameter,
directed = directed
)
Run the code above in your browser using DataLab