中文分词后使用tm包的DocumentTermMatrix()创建矩阵后,得到的结果出现\n符号代码如下:
corpus <- Corpus(VectorSource(sample.words))
sample.dtm <- DocumentTermMatrix(corpus,control=list(removePunctuation=TRUE,
stopwords=TRUE,wordLengths=c(2,Inf)))
inspect(sample.dtm)
结果
Terms
Docs 万\n关键字\n新\n举措 万\n规模 万\n号称 万\n计划 万\n络\n西乐 万\n络\n止痛药\n市场
请问是什么原因呢


雷达卡






京公网安备 11010802022788号







