我第一次使用 RTextTools。这是我的 create_matrix 代码
library(RTextTools)
texts <- c("This is the first document.",
"Is this a text?",
"This is the second file.",
"This is the third text.",
"File is not this.")
doc_matrix <- create_matrix(texts, language="english", removeNumbers=FALSE, stemWords=TRUE, removeSparseTerms=.2)
我收到以下错误:
Error in `[.simple_triplet_matrix`(matrix, , sort(colnames(matrix))) :
Invalid subscript type: NULL.
In addition: Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(j) : is.na() applied to non-(list or vector) of type 'NULL'
我还没有看到其他人发布此错误,并且认为我缺少一些非常基本的东西。
彼得