assign_topic_lda: Assign topics based on LDA model

Description Usage Arguments Details Value See Also

View source: R/lda_miretrieve.R

Description

Assign topics to abstracts based on an LDA model.

Usage

1
assign_topic_lda(df, lda_model, topic.names, col.pmid = PMID)

Arguments

df

Data frame to assign topics to. Should be the same data frame that the LDA model was fitted on.

lda_model

LDA-model.

topic.names

Character vector. Vector containing names of the new topics. Must have the same length as the number of topics lda_model was fitted on.

col.pmid

Symbol. Column containing PubMed-IDs.

Details

Assign topic to abstracts based on an LDA model. To identify the subject of a topic, use plot_lda_term().

Value

Data frame with topics assigned to each abstract based on an LDAmodel.

See Also

fit_lda(), plot_lda_term(), assign_topic()

Other LDA functions: fit_lda(), plot_lda_term(), plot_perplexity()


JulFriedrich/miRetrieve documentation built on Sept. 20, 2021, 11:37 p.m.