library(topicmodels)
rv_dtm <- tidytext_woord %>%
group_by(bestandsnaam, text) %>%
summarise(aantal = n()) %>%
cast_dtm(term = text, document = bestandsnaam, value = aantal)`summarise()` has grouped output by 'bestandsnaam'. You can override using the
`.groups` argument.
rv_lda <- LDA(rv_dtm, k = 10, control = list(seed = 1234))