将CSV文件读入R中的Corpus-tm包

将CSV文件读入R中的Corpus-tm包,r,tm,R,Tm,我想将csv文件的内容读入dataframesource,但当我尝试创建语料库时,它总是说 **argument "x" is missing, with no default** 代码是 corpus1 <- Corpus(object=ds, readerControl=list(reader=readTabular(mapping=m),language="en")) corpus1快速查看?Corpus的帮助说明此函数包含两个参数: x readerControl

我想将csv文件的内容读入dataframesource,但当我尝试创建语料库时,它总是说

**argument "x" is missing, with no default**
代码是

corpus1 <- Corpus(object=ds, 
    readerControl=list(reader=readTabular(mapping=m),language="en"))

corpus1快速查看
?Corpus
的帮助说明此函数包含两个参数:

  • x
  • readerControl
由于您提供了一个参数
object
,但没有
x
,因此您的代码可能如下所示:

corpus1 <- Corpus(x=ds, readerControl=list(...)
corpus1