lda_hashtags {Twitmo}R Documentation

View Documents (hashtags) heavily associated with topics

Description

Convenience Function to extract the most likely topics for each hashtag.

Usage

lda_hashtags(lda_model)

Arguments

lda_model

Fitted LDA Model. Object of class LDA).

Value

Data frame with most likely topic for each hashtag.

Examples

## Not run: 

library(Twitmo)

# load tweets (included in package)
mytweets <- load_tweets(system.file("extdata", "tweets_20191027-141233.json", package = "Twitmo"))

# Pool tweets into longer pseudo-documents
pool <- pool_tweets(data = mytweets)
pooled_dfm <- pool$document_term_matrix

# fit your LDA model with 7 topics
model <- fit_lda(pooled_dfm, n_topics = 7, method = "Gibbs")

lda_hashtags(model)

## End(Not run)

[Package Twitmo version 0.1.2 Index]