运行此R代码时出现此问题
x = read.csv("data2.csv", header = TRUE)
library(tm)
a <-Corpus(DataframeSource(x), readerControl = list(language="english"))
a <- tm_map(a, as.PlainTextDocument)
<simpleError in UseMethod("as.PlainTextDocument", x):
no applicable method for 'as.PlainTextDocument' applied
to an object of class "c('PlainTextDocument', 'TextDocument', 'character')">
我安装了SnowballC
个软件包,并在ubuntu下运行R.
data2.csv是一个包含字符串行的文件。