packages <- c("ldatuning", "tm")
lapply(packages, require, character.only = TRUE)
rm(packages)
data("crude", package = "tm")
dtm <- tm::DocumentTermMatrix(crude)
LDA_models <- FindTopicsNumber(
dtm,
topics = 8:11,
metrics = c("Griffiths2004", "CaoJuan2009", "Arun2010"),
return_models = TRUE
)
LDA_models
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.