I am using the R package tm and I want to do some text mining. This is one document and is treated as a bag of words.
tm
I don\'t understand the documenta
Here's my solution for a text file with a line per observation. the latest vignette on tm (Feb 2017) gives more detail.
text <- read.delim(textFileName, header=F, sep = "\n",stringsAsFactors = F) colnames(text) <- c("MyCol") docs <- text$MyCol a <- VCorpus(VectorSource(docs))