I have the code below to create clean texts for my Twitter sentiment analysis. I want to add another line to remove certain words that I don't want to include in this analysis like "crap", "sick", etc. Could someone please advice how to do so?
tweets <- searchTwitter("iPhone", n=1500, lang="en")
txt <- sapply(tweets, function(x) x$getText())
txt <- gsub("(RT|via)((?:\\b\\W*@\\w+)+)", "", txt)
txt <- gsub("@\\w+", "", txt)
txt <- gsub("[[:punct:]]", "", txt)
txt <- gsub("[[:digit:]]", "", txt)
txt <- gsub("http\\w+", "", txt)
txt <- gsub("[ \t]{2,}", "", txt)
txt <- gsub("^\\s+|\\s+$", "", txt)