Provides the graphs whose edge weights are (mutual) cohesion, together with a graph layout.
Arguments
- c
A
cohesion_matrix
object, a matrix of cohesion values (seecohesion_matrix
).
Value
A list consisting of:
G
: the weighted (community) graph whose edge weights are mutual cohesionG_strong
: the weighted (community) graph consisting of edges for which mutual cohesion is greater than the threshold for strong ties (seestrong_threshold
)layout
: the layout, using the Fruchterman Reingold (FR) force-directed graph drawing for the graphG
Details
Constructs the graphs whose edge weights are (mutual) cohesion
(see cohesion_matrix
), self-loops are removed.
The graph G has adjacency matrix equal to the symmetrized cohesion matrix
(using the entry-wise parallel minimum of C and its transpose).
The graph G_strong has adjacency matrix equal to the thresholded and
symmetrized cohesion matrix (see cohesion_strong
). The threshold is
equal to half of the average of the diagonal of the
cohesion matrix (see strong_threshold
).
A layout is also computed using the Fruchterman-Reingold (FR) force-directed graph drawing algorithm. As a result, it may provide a somewhat different layout each time it is run.
Examples
C <- cohesion_matrix(dist(exdata2))
plot(community_graphs(C)$G_strong)
plot(community_graphs(C)$G_strong, layout = community_graphs(C)$layout)