toLDAvis | R Documentation |
Tool for exploring topic/word distributions using LDAvis topic browser.
toLDAvis(
mod,
docs,
R = 30,
plot.opts = list(xlab = "PC1", ylab = "PC2"),
lambda.step = 0.1,
out.dir = tempfile(),
open.browser = interactive(),
as.gist = FALSE,
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 |
out.dir |
Passed to |
open.browser |
Passed to |
as.gist |
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.
toLDAvis(mod=mod, docs=poliblog5k.docs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.