Your problem lies in the use of system.file. This command looks in the folder location of tm for specific folders. See ?system.files.
Basically, for the document example, it assigning txt to the directory string like "C:/Program Files (x86)/R/R-2.9.0/library/tm/texts/txt" Then the DirSource(txt) constructs a directory source from directory string txt. Finally Corpus constructs a tm corpus from the DirSource object (with some extra arguments to boot). So, to solve your problem, replace txt with the directory containing your files: txt<-"C:/<location to folder>/docs" and then run the subsequent command ovid <- Corpus(DirSource(txt), readerControl = list(reader = readPlain, language = "la", load = TRUE)) (though you may want to change the object name "ovid" to something more descriptive) C On Fri, Oct 2, 2009 at 10:15 AM, PDXRugger <j_r...@hotmail.com> wrote: > > The following code is derived from a paper titled "Text Mining > Infrastructure > in R" (http://www.jstatsoft.org/v25/i05/paper). The example below seems > to > load some default documents for analysis, some sort of latin document. I > cannot for the life of me figure out to load my own document let alone an > entire corpus. I have searched the above documenet as well as related > documentation. Any leads or help would be appreciated. Thanks everyone > > from document > > txt <- system.file("texts", "txt", package = "tm") > (ovid <- Corpus(DirSource(txt), > readerControl = list(reader = readPlain, > language = "la", > load = TRUE))) > > my attempt > txt <- system.file("Speeches/speech", "txt", package = "tm") > (ovid <- Corpus(DirSource(txt), > readerControl = list(reader = readPlain, > language = "la", > load = TRUE))) > > > -- > View this message in context: > http://www.nabble.com/text-mining-tp25717142p25717142.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.