toLDAvisJson | R Documentation |
Tool for exploring topic/word distributions using LDAvis topic browser.
toLDAvisJson(
mod,
docs,
R = 30,
plot.opts = list(xlab = "PC1", ylab = "PC2"),
lambda.step = 0.1,
reorder.topics = TRUE
)
mod |
STM object. Output from stm function. |
docs |
Documents object passed to |
R |
Passed to |
plot.opts |
Passed to |
lambda.step |
Passed to |
reorder.topics |
Passed to |
Tool for exploring topic/word distributions using LDAvis topic browser. Development build of LDAvis available at https://github.com/cpsievert/LDAvis or download from CRAN. Note: LDAvis may renumber the topics.
Carson Sievert and Kenny Shirley. LDAvis: Interactive Visualization of Topic Models. R package version 0.3.1. https://github.com/cpsievert/LDAvis
mod <- stm(poliblog5k.docs, poliblog5k.voc, K=25,
prevalence=~rating, data=poliblog5k.meta,
max.em.its=2, init.type="Spectral")
#please don't run a model with 2 iterations
#this is done here to make it run quickly.
toLDAvisJson(mod=mod, docs=poliblog5k.docs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.