The lines of code below return the following error:
">"object 'readNewsgroup' not found
library(tm)
setwd("C:/Users/DanRoDuq/Downloads/20news-bydate-train")
sci.electr.train=Corpus(DirSource("sci.electronics")
,readerControl=list(reader=readNewsgroup,language="en_US"))
I got the data from: http://qwone.com/~jason/20Newsgroups/lexData.text, and downloaded the file called 20news-bydate.tar.gz
When I replace readNewsgroup by readPlain, the code runs, but the instructions I'm following tell me to use the readNewsGroup setting. Should I maybe be loading another library?
There is no longer a reader called readNewsgroup
in the current tm
-Version (0.6).
With getReaders()
you get all available readers for your Version.
Download the same Version as the instructions you are following and there should be a
readNewsgroup
reader.