Let\'s do some Text Mining
Here I stand with a document term matrix (from the tm
Package)
dtm <- TermDocumentMatrix(
myCorpus,
Here is a very very simple solution I discovered recently
DTM=t(TDM)#taking the transpose of Term-Document Matrix though not necessary but I prefer DTM over TDM
M=as.big.matrix(x=as.matrix(DTM))#convert the DTM into a bigmemory object using the bigmemory package
M=as.matrix(M)#convert the bigmemory object again to a regular matrix
M=t(M)#take the transpose again to get TDM
Please note that taking transpose of TDM to get DTM is absolutely optional, it's my personal preference to play with matrices this way
P.S.Could not answer the question 4 years back as I was just a fresh entry in my college