Description Usage Arguments Examples
In a social network, community-detection algorithms can be used to find cliques that are more strongly connected to each other than to the rest of the network. For each community, the "mayor" is the node with the highest influence. Finding mayors can often be a useful way of figuring out whether the community has a definable theme or group identity.
1 |
g |
An igraph graph object. |
comm |
An igraph communities object |
n |
The number of mayors to find. By default, returns mayors for the largest n communities. |
metric |
Function to use in determining influence within a community |
extra |
Additional communities whose mayors should be found. |
1 2 3 4 5 6 7 8 9 10 | library(dplyr)
library(igraph)
g <- sample_tweets %>%
ws_to_graph() %>%
graph_lcc()
fg <- g %>%
as.undirected() %>%
simplify() %>%
fastgreedy.community()
mayors(g,fg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.