sma_bar: Bar chart showing network influencers

Description Usage Arguments Examples

Description

This function is used together with sma_plot(), and gives a color-coded guide to the top influencers and their relative influence scores.

Usage

1
sma_bar(g, n = 8, highlight = NULL, extra = NULL)

Arguments

g

An igraph graph object.

n

Number of influencers to display. 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.

extra

A list of node names to be highlighted in addition to the top-ranked ones.

Examples

1
2
3
4
library(dplyr)
sample_tweets %>%
    ws_to_graph() %>%
    sma_bar()

ccjolley/cRimson documentation built on May 13, 2019, 2:16 p.m.