Description Usage Arguments Value Examples
The function creates a HTML document with the words of texts colored depending on the topic allocation of each word.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
text |
The result of |
ldaID |
List of IDs for |
id |
ID of the article of interest |
ldaresult |
A result object from the |
label |
Optional label for each topic |
vocab |
Character: Vector of |
wordOrder |
Type of output: |
colors |
Character vector of colors. If the vector is shorter than the number of topics it will be completed by "black" entrys. |
fixColors |
Logical: If |
meta |
Optional input for meta data. It will be printed in the header of the output. |
originaltext |
Optional a list of texts (the |
unclearTopicAssignment |
Logical: If TRUE all words which are assigned to more than one topic will not be colored. Otherwise the words will be colored in order of topic apperance in the |
htmlreturn |
Logical: HTML output for tests |
A HTML document
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)
topicsInText(text=politics$text, ldaID=names(poliLDA), id="ID2756",
ldaresult=LDAresult, vocab=words10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.