tdm_tidiers | R Documentation |
Tidy a DocumentTermMatrix or TermDocumentMatrix into
a three-column data frame: term{}
, and value (with
zeros missing), with one-row-per-term-per-document.
## S3 method for class 'DocumentTermMatrix' tidy(x, ...) ## S3 method for class 'TermDocumentMatrix' tidy(x, ...) ## S3 method for class 'dfm' tidy(x, ...) ## S3 method for class 'dfmSparse' tidy(x, ...) ## S3 method for class 'simple_triplet_matrix' tidy(x, row_names = NULL, col_names = NULL, ...)
x |
A DocumentTermMatrix or TermDocumentMatrix object |
... |
Extra arguments, not used |
row_names |
Specify row names |
col_names |
Specify column names |
if (requireNamespace("topicmodels", quietly = TRUE)) { data("AssociatedPress", package = "topicmodels") AssociatedPress tidy(AssociatedPress) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.