View source: R/pald_functions.R
community_graphs | R Documentation |
Provides the graphs whose edge weights are (mutual) cohesion, together with a graph layout.
community_graphs(c)
c |
A |
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.
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 (see strong_threshold
)
layout
: the layout, using the Fruchterman Reingold (FR)
force-directed graph drawing for the graph G
C <- cohesion_matrix(dist(exdata2))
plot(community_graphs(C)$G_strong)
plot(community_graphs(C)$G_strong, layout = community_graphs(C)$layout)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.