Learn R Programming

saotd (version 0.2.0)

tweet_topics: Tweet Topics

Description

Determines the Latent topics within a dataframe by using Latent Dirichlet Allocation (LDA) model parameters. Uses the `ldatuning` package and outputs an ldatuning plot. Prepares Tweet text, creates DTM, conducts LDA, display data terms associated with each topic.

Usage

tweet_topics(DataFrame, clusters, method = "Gibbs", set_seed = 1234,
  num_terms = 10)

Arguments

DataFrame

DataFrame of Twitter Data.

clusters

The number of latent clusters.

method

method = "Gibbs"

set_seed

Seed for reproducable results.

num_terms

The desired number of terms to be returned for each topic.

Value

Returns LDA topics.

Examples

Run this code
# NOT RUN {
library(saotd)
data <- raw_tweets
LDA_data <- tweet_topics(DataFrame = data,
                         clusters = 8,
                         method = "Gibbs",
                         set_seed = 1234,
                         num_terms = 10)

LDA_data
# }

Run the code above in your browser using DataLab