Description Usage Arguments Value See Also Examples
Transcript apply the removal of stopwords.
1 2 3 4 |
textString |
A character string of text or a vector of character strings. |
stopwords |
A character vector of words to remove
from the text. qdap has a number of data sets that can
be used as stopwords including: Top200Words, Top100Words,
Top25Words. For the tm package's traditional English
stop words use |
unlist |
logical. If TRUE unlists into one vector. General use intended for when separate is FALSE. |
separate |
logical. If TRUE separates sentences into words. If FALSE retains sentences. |
strip |
logical. IF TURE strips the text of all punctuation except apostrophes. |
unique |
logical. If TRUE keeps only unique words (if unlist is TURE) or sentences (if unlist is FALSE). General use intended for when unlist is TRUE. |
char.keep |
If strip is TRUE this argument provides a means of retaining supplied character(s). |
names |
logical. If TRUE will name the elements of the vector or list with the original textString. |
ignore.case |
logical. If TRUE stop words will be removed regardless of case. Additionally, case will be stripped from the text. If FALSE stopwords removal is contingent upon case. Additionally, case is not stripped. |
apostrophe.remove |
logical. If TRUE removes apostrophe's from the output. |
... |
further arguments passed to strip function |
Returns a vector of sentences, vector of words, or (default) a list of vectors of words with stop words removed. Output depends on supplied arguments.
1 2 3 4 5 6 7 8 9 | stopwords(DATA$state)
stopwords(DATA$state, tm::stopwords("english"))
stopwords(DATA$state, Top200Words)
stopwords(DATA$state, Top200Words, strip = TRUE)
stopwords(DATA$state, Top200Words, separate = FALSE)
stopwords(DATA$state, Top200Words, separate = FALSE, ignore.case = FALSE)
stopwords(DATA$state, Top200Words, unlist = TRUE)
stopwords(DATA$state, Top200Words, unlist = TRUE, strip=TRUE)
stopwords(DATA$state, Top200Words, unlist = TRUE, unique = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.