我是R的文本处理新手.我正在尝试下面的简单代码
library(RTextTools)
texts <- c("This is the first document.", "This is the second file.", "This is the third text.")
matrix <- create_matrix(texts,ngramLength=3)
这是问题2和3个词使用R TM包的短语中的答案之一
但是,它会产生错误Error in FUN(X[[2L]], ...) : non-character argument.
我删除ngramLength参数时可以生成文档术语矩阵,但我需要搜索某些字长的短语.任何替代或更正的建议?