# NOT RUN {
# Create a random network with 10 nodes.
nw <- random_network(10)
# Rewire nodes in the network each with probability 1/2
nw_rewired <- rewire_connections(nw, 0.5)
# Plot the two networks for comparison
g <- plot(nw)
plot(nw_rewired, g) # Pass in g to mirror the layout.
# Or plot the differential network.
plot_network_diff(nw, nw_rewired, g)
# }
Run the code above in your browser using DataLab