Presently, I'm using the function DocumentTermMatrix() in R to fit LDA model. In addition to the default stop words, I want to add my own words which are supposed to be removed.
library(tm)
myStopwords <- c("aa", "bb")
dtm <- DocumentTermMatrix(myCorpus,
control = list(
tolower = TRUE,
removePunctuation = TRUE,
removeNumbers= TRUE,
stemming = FALSE,
stopwords = TRUE,
minWordLength = 2))
Can one help me on how to add my own stop words in the above code? Thank you!