I wonder how can I get the term frequency weight in tm packge which is (tf=term/total terms in the document)`
MyMatrix <- DocumentTermMatrix(a, control = list(weight= weightTf))
After I use this weight it shows the frequency of term not TF weight like this
Doc(1) 1 0 0 3 0 0 2
Doc(2) 0 0 0 0 0 0 0
Doc(3) 0 5 0 0 0 0 1
Doc(4) 0 0 0 2 2 0 0
Doc(5) 0 4 0 0 0 0 1
Doc(6) 5 0 0 0 1 0 0
Doc(7) 0 5 0 0 0 0 0
Doc(8) 0 0 0 1 0 0 7