word_list | R Documentation |
Transcript Apply Raw Word Lists and Frequency Counts by grouping variable(s).
word_list(
text.var,
grouping.var = NULL,
stopwords = NULL,
alphabetical = FALSE,
cut.n = 20,
cap = TRUE,
cap.list = NULL,
cap.I = TRUE,
rm.bracket = TRUE,
char.keep = NULL,
apostrophe.remove = FALSE,
...
)
text.var |
The text variable. |
grouping.var |
The grouping variables. Default |
stopwords |
A vector of stop words to remove. |
alphabetical |
If |
cut.n |
Cut off point for reduced frequency stop word list (rfswl). |
cap |
logical. If |
cap.list |
Vector of words to capitalize. |
cap.I |
logical. If |
rm.bracket |
logical If |
char.keep |
A character vector of symbols (i.e., punctuation) that
|
apostrophe.remove |
logical. If |
... |
Other arguments passed to |
An object of class "word_list"
is a list of lists of vectors
or dataframes containing the following components:
cwl |
complete word list; raw words |
swl |
stop word list; same as rwl with stop words removed |
fwl |
frequency word list; a data frame of words and corresponding frequency counts |
fswl |
frequency stopword word list; same as fwl but with stop words removed |
rfswl |
reduced frequency stopword word list; same as fswl but truncated to n rows |
## Not run:
word_list(raj.act.1$dialogue)
out1 <- with(raj, word_list(text.var = dialogue,
grouping.var = list(person, act)))
names(out1)
lapply(out1$cwl, "[", 1:5)
with(DATA, word_list(state, person))
with(DATA, word_list(state, person, stopwords = Top25Words))
with(DATA, word_list(state, person, cap = FALSE, cap.list=c("do", "we")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.