Wrapper to create Json mapping for LDAvis. This can be useful in indirect render e.g. Shiny Dashboards
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.