Description Usage Arguments Value Author(s) See Also
Transform bags of words into a document to term matrix after applying some filters.
1 2 3 4 5 6 7 8 9 10 | create_dtm(
bow,
min_term = 0,
max_term = Inf,
min_doc = 0,
max_doc = Inf,
nbterm = 1000,
keep_terms = NULL,
docvar = NULL
)
|
bow |
Tibble. Output of the function eval_bow. Document ids must be in a variable called "document". |
min_term |
Integer. Remove terms appearing less than this number of times. |
max_term |
Integer. Remove terms appearing more than this number of times. |
min_doc |
Integer, Remove terms appearing in less than this number of documents. |
max_doc |
Integer, Remove terms appearing in more than this number of documents. |
nbterm |
Integer. Select this number of terms based on tf-idf. |
keep_terms |
Character vector. List of words which should be included even if they do not meet the other criteria. |
docvar |
Tibble. Additional information about documents to be appended to the docvar of the dtm. Document ids must be in a variable called "document". |
A document to term matrix.
Nicolas Mangin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.