Learn R Programming

saotd (version 0.2.0)

bigram_network: Twitter Bi-Gram Network

Description

Displays the Bi-Gram Network. Bi-Gram networks builds on computed Bi-Grams. Bi-Gram networks serve as a visualization tool that displays the relationships between the words simultaneously as opposed to a tabular display of Bi-Gram words.

Usage

bigram_network(BiGramDataFrame, number = 300, layout = "fr",
  edge_color = "royalblue", node_color = "black", node_size = 3,
  set_seed = 1234)

Arguments

BiGramDataFrame

DataFrame of Bi-Grams.

number

The minimum desired number of Bi-Gram occurances to be displayed (number = 300, would display all Bi-Grams that have at least 300 instances.)

layout

Desired layout from the `ggraph` package. Acceptable layouts: "star", "circle", "gem", "dh", "graphopt", "grid", "mds", "randomly", "fr", "kk", "drl", "lgl"

edge_color

User desired edge color.

node_color

User desired node color.

node_size

User desired node size.

set_seed

Seed for reproducable results.

Value

A ggraph plot.

Examples

Run this code
# NOT RUN {
library(saotd)
data <- raw_tweets
TD_Bigram <- bigram(DataFrame = data)
TD_Bigram_Network <- bigram_network(BiGramDataFrame = TD_Bigram,
                                    number = 300,
                                    layout = "fr",
                                    edge_color = "royalblue",
                                    node_color = "black",
                                    node_size = 3,
                                    set_seed = 1234)

TD_Bigram_Network
# }

Run the code above in your browser using DataLab