0

I am currently working with a flat text file that is literally just a large body of text copy and pasted into notepad.I designated a folder in my desktop as my corpus to use as my working directory.

    #Map a directory to the corpus location on the desktop 
    cname<-file.path("~", "Desktop", "corpus" )

    #Begin text processing 
    docs<-Corpus(DirSource(cname))
    summary(docs)

Before I can do any sort of clustering, I am getting the error from summary:

    Error in DirSource("cname/") : empty directory

Does this error involve the way the document is formatted? What is the proper way to format a flat text file in order to use the tm package?

Vindication09
  • 45
  • 2
  • 8

0 Answers0