How to colour edges within community clusters in igraph
I have created a graph and used the propagating labels community detection algorithm to detect subgroups in the graph. I have then plotted the graph and coloured the vertices according to their group membership using rainbow colours. Here is the code I used: g <- watts.strogatz.game(1, 100, 5, 0.05) clp <- cluster_label_prop(g) V(g)$community <- clp$membership rain <- rainbow(14, alpha=.5) V(g)$color <- rain[V(g)$community] plot(g, vertex.size=4, vertex.label=NA) I would now like to colour edges that lie between members of a subgroup in the same colour as that subgroup, in order to better