label.propagation.community (graph, weights = NULL,
initial = NULL, fixed = NULL)NANULL, every vertex will have
a different label at the beginning. Otherwise it must be a vector
with an entry for each vertex. Non-negative values denote different
labels, negative entries denote vertices withlabel.propagation.community returns a communities
object, please see the communities manual page for
details. From the abstract of the paper:
communities for extracting the actual results.
fastgreedy.community,
walktrap.community and spinglass.community
for other community detection methods.g <- erdos.renyi.game(10, 5/10) %du% erdos.renyi.game(9, 5/9)
g <- add.edges(g, c(1, 12))
label.propagation.community(g)Run the code above in your browser using DataLab