Grow networks using Barab<U+00E1>si & Alberts's (2002) preferential attachment model.
grow_ba(n = 100L, m = 5L, power = 1)
Integer. Number of nodes in the network.
Integer. Number of edges added for each incoming node.
Numeric. Controls the selection of nodes by raising the degree to this power.
n x n adjacency matrix.
Barab<U+00E1>si, A. L., & Albert, R. (1999). Emergence of scaling in random networks. Science, 286(5439), 509-512.
# NOT RUN {
# generate small graph
grow_ba(n = 6, m = 2)
# }
# NOT RUN {
# generate large graph, flat degree distribution
grow_ba(n = 100, m = 10, p = .1)
# generate large graph, steep degree distribution
grow_ba(n = 100, m = 10, p = 10)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab