Description Usage Arguments Value Examples
Perform content analysis; build LDA model on abstract text
1 | contentAnalysis(articles_df, k, words_to_remove)
|
articles_df |
Dataframe of articles. Output from getArticles() function. |
k |
Number of topics |
words_to_remove |
(Optional) Additional stopwords to be removed |
List
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | content <- contentAnalysis(articles_df = articles_df, k = 10)
# Add your own stop words
words_to_remove <- c("stopword1", "stopword2")
content <- contentAnalysis(articles_df = articles_df, k = 10, words_to_remove = words_to_remove)
# Word cloud
wordCloud(content)
# Top words in corpus
topNWordsInDoc(content, n = 10)
# Plot top words
topNWordsInDoc(content, n = 10, plot = TRUE)
# Top n words in topics
topNWordsInTopic(content, n = 3)
# Plot top n words in topics
topNWordsInTopic(content, n = 3, plot = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.