Description Usage Arguments Details Value Warning See Also Examples
Transcript apply descriptive word statistics.
1 2 3 4 5 6 7 8 9 10 11 |
text.var |
The text variable or a |
grouping.var |
The grouping variables. Default |
tot |
Optional turns of talk variable that yields turn of talk measures. |
parallel |
logical. If |
rm.incomplete |
logical. If |
digit.remove |
logical. If |
apostrophe.remove |
logical. If |
digits |
Integer; number of decimal places to round when printing. |
... |
Any other arguments passed to |
Note that a sentence is classified with only one endmark. An imperative sentence is classified only as imperative (not as a state, quest, or exclm as well). If a sentence is both imperative and incomplete the sentence will be counted as incomplete rather than imperative. labeled as both imperative
Returns a list of three descriptive word statistics:
ts |
A data frame of descriptive word statistics by row |
gts |
A data frame of word/sentence statistics per grouping variable:
|
mpun |
An account of sentences with an improper/missing end mark |
word.elem |
A data frame with word element columns from gts |
sent.elem |
A data frame with sentence element columns from gts |
omit |
Counter of omitted sentences for internal use (only included if some rows contained missing values) |
percent |
The value of percent used for plotting purposes. |
zero.replace |
The value of zero.replace used for plotting purposes. |
digits |
integer value od number of digits to display; mostly internal use |
It is assumed the user has run sentSplit
on their
data, otherwise some counts may not be accurate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ## Not run:
word_stats(mraja1spl$dialogue, mraja1spl$person)
(desc_wrds <- with(mraja1spl, word_stats(dialogue, person, tot = tot)))
## Recycle for speed boost
with(mraja1spl, word_stats(desc_wrds, person, tot = tot))
scores(desc_wrds)
counts(desc_wrds)
htruncdf(counts(desc_wrds), 15, 6)
plot(scores(desc_wrds))
plot(counts(desc_wrds))
names(desc_wrds)
htruncdf(desc_wrds$ts, 15, 5)
htruncdf(desc_wrds$gts, 15, 6)
desc_wrds$mpun
desc_wrds$word.elem
desc_wrds$sent.elem
plot(desc_wrds)
plot(desc_wrds, label=TRUE, lab.digits = 1)
## Correlation Visualization
qheat(cor(scores(desc_wrds)[, -1]), diag.na = TRUE, by.column =NULL,
low = "yellow", high = "red", grid = FALSE)
## Parallel (possible speed boost)
with(mraja1spl, word_stats(dialogue, list(sex, died, fam.aff)))
with(mraja1spl, word_stats(dialogue, list(sex, died, fam.aff),
parallel = TRUE))
## Recycle for speed boost
word_stats(desc_wrds, mraja1spl$sex)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.