Description Usage Arguments Examples
Function that identifies structurally-based groups using the Girvan<e2><80><93>Newman, edge betweenness community detection algorithm and then produces a plot where nodes are colored based on group membership.
1 | graph_communities(edgelist, sizeby = "none", weighted = FALSE)
|
sizeby |
custom option to size nodes based on either "degree", "eigenvector", "betweenness", or "closeness" centrality. Default to "none". |
weighted |
custom option to size edges based on weighted values. Default to "FALSE". |
edglist |
a dataframe that contains a list of people and their associates. The first column represents source nodes and the second column represents target nodes. |
1 2 3 4 5 6 7 8 9 10 11 | # minimal example
source <- c("a", "a", "b", "c", "d", "d", "d")
target <- c("b", "c", "c", "d", "e", "f", "g")
associations <- data.frame(source, target)
graph_communities(edgelist = associations, sizeby = "betweenness")
# FM 3-24 example affiliation matrix
data("fm3_24_affiliation")
affiliations <- as.data.frame(fm3_24_affiliation)
associations <- transform2social(edgelist = affiliations)
graph_communities(edgelist = associations, sizeby = "betweenness", weighted = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.