# NOT RUN {
# Load a pre-formatted dtm and topic model
data(nih_sample_dtm)
data(nih_sample_topic_model)
assignments <- t(apply(nih_sample_topic_model$theta, 1, function(x){
x[ x < 0.05 ] <- 0
x / sum(x)
}))
labels <- LabelTopics(assignments = assignments, dtm = nih_sample_dtm, M = 2)
# }
Run the code above in your browser using DataLab