So I'm following a tutorial on making a word cloud with R. This is the first time getting back into programming for me in a long time and Im having issues with file directories and file locations to start.
> cname <- file.path(".","corpus","target")
> library (tm)
> docs <- Corpus(DirSource(cname))
Error in DirSource(cname) : empty directory
Change the first parameter to empty string:
cname <- file.path("", "corpus", "target")
This will correctly give the absolute path from the filesystem root,
/corpus/target on a Mac.
After that, confirm that you have the right directory with: