dtm_melter | R Documentation |
Converts a DTM into a data frame with three columns:
documents, terms, frequency. Each row is a unique
document by term frequency. This is akin to reshape2
packages melt
function, but works on a sparse matrix.
The resulting data frame is also equivalent to the
tidytext
triplet tibble.
dtm_melter(dtm)
dtm |
Document-term matrix with terms as columns. Works with DTMs
produced by any popular text analysis package, or using the
|
returns data frame with three columns: doc_id, term, freq
Dustin Stoltz
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.