Function to plot topic network

Share:

Description

Function to plot topic network

Usage

1
topic_network(k, model)

Arguments

k

Number of words from each topic to be included in graph

model

trained tmTopicModel object

Value

network The graph visualising the network

Examples

1
2
3
4
5
6
7
8
## Not run: 
x <- tmCorpus(rep("as, a , a ,s  l k l l k k j h g f f hg j aaa", 100))
require(rJava)
model <- suppressMessages(train(x))
table_topic <- topic_table(model)
network <- topic_network(10 ,table_topic$words)

## End(Not run)