r - Inconsistency when plotting communities grouping -
I have a problem in creating conspiracy of communities Please consider following MWE
Library (Igraph) m & lt; - Matrix (c (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 , 0,1,0, 4,1,0,0,0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,0), Nrow = 6, Ncol = 6) g & lt; - graph.adjacency (m) memb & lt; - Membership (edge.betweenness.community (g)) memb # [1] 1 1 2 1 2 2 I hope to see two communities in the plot plot (g, mark.groups = list (memb), edge.width = 0.5, edge.arrow width = 0.2) But in fact only one community
Do I have something Am doing wrong
If I understand your question correctly, you can write mark.groups Arguments are using the wrong. Try plot (g, mark.groups = lapply (unique (memb), function (n) which (memb == n)), edge.method = 0.5, edge. Width = 0.2)
Comments
Post a Comment