I am new to R and I'm trying to create term document matrix with a csv file. But the results show that some of the words are missing the letter "e" in the end. How can I make the term document matrix showing the full words? It will be great if you could also let me know when you see a part that doesn't look right. Thank you!
library(tm)
posts<-read.csv("/abcd.csv",header=TRUE)
require(tm)
posts<-Corpus(VectorSource(posts))
library(SnowballC)
Corpus<-tm_map(Corpus,content_transformer(tolower))
Corpus<-tm_map(Corpus,stripWhitespace)
Corpus<-tm_map(Corpus,removeWords,stopwords("english"))
Corpus<-tm_map(Corpus,stemDocument)
inspect(Corpus[9])
tdm<-TermDocumentMatrix(Corpus)
tdm
tdm=as.matrix(TermDocumentMatrix(Corpus,control=list(wordLengths=c(1,Inf))))
tdm
rowSums(tdm)
Below are some of the words I'm seeing here as the results from the file.
caus
downtim
failur
outag
unreachabl