Description Usage Arguments Value Author(s) See Also Examples
View source: R/hierarchical_coverage_term.R
The unique coverage of a text vector by a term after partitioning out the elements matched by previous terms.
1 2 3 4 5 6 7 8 |
text.var |
A text vector (vector of strings). |
terms |
A vector of regular expressions to match against |
bound |
logical. If |
ignore.case |
logical. Should case be ignored in matching the
|
sort |
logical. If |
... |
ignored. |
Returns a data.frame
with 3 columns:
the search term
the unique coverage of the term
the cumulative coverage of the term
Steve T. Simpson and Tyler Rinker <tyler.rinker@gmail.com>.
Other hierarchical_coverage functions:
hierarchical_coverage_regex()
1 2 3 4 5 6 7 8 | x <- presidential_debates_2012[["dialogue"]]
terms <- frequent_terms(x)[[1]]
(out <- hierarchical_coverage_term(x, terms))
plot(out)
(out2 <- hierarchical_coverage_term(x, frequent_terms(x, 30)[[1]]))
plot(out2, use.terms = TRUE)
plot(out2, use.terms = TRUE, mark.one = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.