dfmat <- corpus_subset(data_corpus_inaugural, Year > 1970) |>
tokens() |>
dfm()
if (FALSE) {
# shortcut conversion to lda package list format
identical(quanteda:::dfm2lda(dfmat), convert(dfmat, to = "lda"))
}
if (FALSE) {
# shortcut conversion to lda package list format
identical(dfm2ldaformat(dfmat), convert(dfmat, to = "lda"))
}
Run the code above in your browser using DataLab