Hello everyone and thanks for your help. I am using R 3.1.3 to create a comparison cloud and i will like to group certain words under one word. Example: easier and ease will be grouped under easy. I am using the tm package and here is my code, but it doesn't work. I still see the words i am trying to convert.
lines.corp <- Corpus(VectorSource(all)) #converting data frame to a Corpus#
########################################################################
lines.corp2 <- lines.corp
toString <- content_transformer(function(x, from, to) gsub(from, to, x))
lines.corp2 <- tm_map(lines.corp2, toString, "ease", "easy")
lines.corp2 <- tm_map(lines.corp2, toString, "easier", "easy")
lines.corp2 <- tm_map(lines.corp2, toString, "convenience", "convenient")
lines.corp2 <- tm_map(lines.corp, stripWhitespace)
lines.corp2 <- tm_map(lines.corp2, removeNumbers)
lines.corp2 <- tm_map(lines.corp2, removePunctuation)
lines.corp2 <- tm_map(lines.corp2, removeWords, stopwords('english'))