I am new to tm
package in R. I am running the following code on corpus but output of DocumentTermMatrix
is not considering all the terms.
corpus = Corpus(VectorSource(text))
corpus = tm_map(corpus, PlainTextDocument)
dtm = DocumentTermMatrix(corpus)
dtm
# DocumentTermMatrix (documents: 20517, terms: 2)
It shows only two terms whereas I have more than 15 terms in my data set. Can anyone help here please?