community_graphs {pald} | R Documentation |
Community Graphs
Description
Provides the graphs whose edge weights are (mutual) cohesion, together with a graph layout.
Usage
community_graphs(c)
Arguments
c |
A |
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.
Value
A list consisting of:
-
G
: the weighted (community) graph whose edge weights are mutual cohesion -
G_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
Examples
C <- cohesion_matrix(dist(exdata2))
plot(community_graphs(C)$G_strong)
plot(community_graphs(C)$G_strong, layout = community_graphs(C)$layout)