Fit LDA-model with k topics.
fit_lda(
df,
k,
stopwords = stopwords_miretrieve,
method = "gibbs",
control = NULL,
seed = 42,
col.abstract = Abstract,
col.pmid = PMID
)Data frame containing abstracts and PubMed-IDs.
Integer. Number of topics to fit. Must be >=2.
Data frame containing stop words.
String. Either "gibbs" or "VEM".
Control parameters for LDA modeling. For more information,
see the documentation of the LDAcontrol class in the topicmodels
package.
Integer. Seed for reproducibility.
Column containing abstracts.
Column containing PubMed-ID.
LDA-model.
Fit LDA-model with k topics from a data frame.
fit_lda() is based on LDA() from the package
topicmodels.
Other LDA functions:
assign_topic_lda(),
plot_lda_term(),
plot_perplexity()