Description Usage Arguments Value Examples
Save Latent Dirichlet Allocation visualisation.
1 2 3 | save_ldavis_html(prepared_vis, file, ...)
save_ldavis_json(prepared_vis, file)
|
prepared_vis |
Prepapred vis as returned by |
file |
A file name to save the html or json. |
... |
Additional arguments from the official documentation. |
Invisibly returns file
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | docs <- prepare_documents(corpus)
dict <- corpora_dictionary(docs)
corpora <- doc2bow(dict, docs)
# lda model
model <- model_lda(
corpus = corpora,
id2word = dict,
iterations = 50L,
num_topics = 2L
)
# visualise
vis <- prepare_ldavis(model, corpora, dict)
## Not run: save_ldavis_html(vis, "lda.html")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.