Description Usage Arguments Examples
This function draws a (potentially large) social network. A metric function (by default igraph::page.rank) is used to identify up to eight top influencers, and these are highlighted by edge coloring.
1 |
g |
An igraph graph object. |
n |
Number of nodes to highlight. The maximum value (8) is set by the number of colors available from RColorBrewer. |
highlight |
The results of a scoring function according to which highlighted nodes should be chosen. Calls igraph::page.rank() if nothing is passed. Calculating the scoring in advance lets you economize if you'll be using the same scoring function for an sma_plot() call and an sma_bar() call. |
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. |
extra |
A list of node names to be highlighted in addition to the top-ranked ones. |
1 2 3 4 5 | library(dplyr)
sample_tweets %>%
ws_to_graph() %>%
graph_lcc() %>%
sma_plot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.