Description Usage Arguments Value See Also Examples
Use a count matrix to classify the rows, based on the frequencies in the cells.
1 |
x |
A |
n |
The number of classifications per row to return. |
ties.method |
Either |
seed |
A seed to use in the sample to make the results reproducible. |
... |
ignored. |
Returns a single vector
or list
of ordered vectors of predicted classifications; order by term frequency.
Ties default to random order.
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 | ## Not run:
library(dplyr)
data(presidential_debates_2012)
discoure_markers <- list(
response_cries = c("\\boh", "\\bah", "\\baha", "\\bouch", "yuk"),
back_channels = c("uh[- ]huh", "uhuh", "yeah"),
summons = "hey",
justification = "because"
)
presidential_debates_2012 %>%
with(., term_count(dialogue, TRUE, discoure_markers)) %>%
classify()
presidential_debates_2012 %>%
with(., term_count(dialogue, TRUE, discoure_markers)) %>%
classify() %>%
plot()
presidential_debates_2012 %>%
with(., term_count(dialogue, TRUE, discoure_markers)) %>%
classify() %>%
plot(rm.na=FALSE)
presidential_debates_2012 %>%
with(., term_count(dialogue, TRUE, discoure_markers)) %>%
classify(n = 2)
presidential_debates_2012 %>%
with(., term_count(dialogue, TRUE, discoure_markers)) %>%
{.[!uncovered(.), -c(1:2)]} %>%
classify()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.