Description Usage Arguments Examples
Make a TermDocumentMatrix
from a vector of text and and
optional vector of documents. To stem a document as well use the
q_tdm_stem
version of q_tdm
which uses SnowballC's
wordStem
.
1 2 3 4 5 |
text |
A vector of strings. |
docs |
A vector of document names. |
to |
target conversion format, consisting of the name of the package into whose document-term matrix representation the dfm will be converted:
|
keep.hyphen |
logical. If |
ngrams |
A vector of ngrams (multiple wrds with spaces). Using this option results in the ngrams that will be retained in the matrix. |
... |
Additional arguments passed to |
1 2 3 4 5 | (x <- with(presidential_debates_2012, q_tdm(dialogue, paste(time, tot, sep = "_"))))
tm::weightTfIdf(x)
(x2 <- with(presidential_debates_2012, q_tdm_stem(dialogue, paste(time, tot, sep = "_"))))
remove_stopwords(x2, stem=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.