R tm package vcorpus: Error in converting corpus to data frame

后端 未结 5 2367
轻奢々
轻奢々 2020-12-01 09:51

I am using the tm package to clean up some data using the following code:

mycorpus <- Corpus(VectorSource(x))
mycorpus <- tm_map(mycorpus,         


        
5条回答
  •  自闭症患者
    2020-12-01 10:22

    The older answer posted by MrFlick works only in previous version on tm, I was able to fix it by removing content from the formula.

    dataframe<-data.frame(text=unlist(sapply(mycorpus, `[`)), stringsAsFactors=F)
    

提交回复
热议问题