Description Usage Arguments Value Examples
remove_stopwords
- Remove stopwords and < nchar words from a
TermDocumentMatrix
or DocumentTermMatrix
.
prep_stopwords
- Join multiple vectors of words, convert to lower case,
and return sorted unique words.
1 2 3 4 | remove_stopwords(x, stopwords = tm::stopwords("english"), min.char = 3,
max.char = NULL, stem = FALSE, denumber = TRUE)
prep_stopwords(...)
|
x |
A |
stopwords |
A vector of stopwords to remove. |
min.char |
The minimal length character for retained words. |
max.char |
The maximum length character for retained words. |
stem |
Logical. If |
denumber |
Logical. If |
... |
|
Returns a TermDocumentMatrix
or DocumentTermMatrix
.
1 2 3 4 5 6 | (x <-with(presidential_debates_2012, q_dtm(dialogue, paste(time, tot, sep = "_"))))
remove_stopwords(x)
(y <- with(presidential_debates_2012, q_tdm(dialogue, paste(time, tot, sep = "_"))))
remove_stopwords(y)
prep_stopwords("the", "ChIcken", "Hello", tm::stopwords("english"), c("John", "Josh"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.