I have already generated a termDocumentMatrix
as showed below:
> tmm
[[1]]
<<DocumentTermMatrix (documents: 18, terms: 4886)>>
Non-/sparse entries: 11956/75992
Sparsity : 86%
Maximal term length: 25
Weighting : term frequency (tf)
Then I want to convert it to numeric matrix, it shows an error. The command I use is:
matrix<-data.matrix(tmm)
Then the matrix become a list like this:
list(i = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Where did I got wrong?