Description Usage Arguments Value Examples
Creates a pdf showing a heat map. For each topic, the heat map shows the deviation of its current share from its mean share. Shares can be calculated on corpus level or on subcorpus level concerning LDA vocabulary. Shares can be calculated in absolute deviation from the mean or relative to the mean of the topic to account for different topic strengths.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
object |
|
ldaresult |
LDA result object. |
ldaID |
Character vector containing IDs of the texts. |
select |
Numeric vector containing the numbers of the topics to be plotted. Defaults to all topics. |
tnames |
Character vector with labels for the topics. |
norm |
Logical: Should the values be normalized by the mean topic share to account for differently sized topics (default: |
file |
Character vector containing the path and name for the pdf output file. |
unit |
Character: To which unit should dates be floored (default: |
date_breaks |
How many labels should be shown on the x axis (default: |
margins |
See |
... |
Additional graphical parameters passed to |
A pdf. Invisible: A dataframe.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data(politics)
poliClean <- cleanTexts(politics)
words10 <- makeWordlist(text=poliClean$text)
words10 <- words10$words[words10$wordtable > 10]
poliLDA <- LDAprep(text=poliClean$text, vocab=words10)
LDAresult <- LDAgen(documents=poliLDA, K=10, vocab=words10)
plotHeat(object=poliClean, ldaresult=LDAresult, ldaID=names(poliLDA))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.