update:
Thanks for help. Check comments. Because of package version, I delete the tolower and it works. I just need to find another way to make it lower.
==
You are not loading you document correctly. If you have your data in x.csv
file then use following:
> x <- read.csv(file_loc, header = TRUE) // where file_loc is the path to the csv file
> x <- data.frame(lapply(x, as.character), stringsAsFactors=FALSE)
> require(tm)
Loading required package: tm
> dd <- Corpus(DataframeSource(x))
> inspect(dd)
Then simply use stemDocument
like below:
fbCorpus <- tm_map(fbCorpus, stemDocument)