How to do topic analysis from text file? i put this code, but I get the error below when i run the last line. Why it is making this error?
library(tm)
treex <- treex <- readLines(file.choose())
CorpusObj<- VectorSource(treex)
breeze <- LDA(CorpusObj[1:200], control=list(alpha = 0.1), k=20)
Error in !all.equal(x$v, as.integer(x$v)) : invalid argument type
您需要CorpusObj [1:200,]
breeze <- LDA(CorpusObj[1:200, ], control=list(alpha = 0.1), k=20)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.