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. This generates a plot similar to sma_plot(), except that the largest communities in the network are highlighted.
1 2 |
g |
An igraph graph object. |
c |
An igraph communities object. |
n |
The number of mayors to find. By default, returns mayors for the largest n communities. |
layout |
Results of an igraph layout routine. (layout.fruchterman.reingold is called if nothing is passed). Because these calculations can be time consuming, it makes sense to obtain the layout in advance if you'll be making several versions of the same plot. |
showMayors |
If true, highlight the location of mayors for the communities shown. |
extra |
Additional communities that should be highlighted. |
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()
community_plot(g,fg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.