Description Usage Arguments Value Examples
coverage
- Get coverage of a logical vector, term_count
, or search_term
object.
coverage.term_count
- Extract coverage information from a term_count
object including the percentage of rows that sum to zero as well as the
location of non-covered rows for easy extraction.
1 |
x |
A logical vector, |
... |
Ignored. |
term_count
- Returns a proportion of elements covered by the search.
coverage.term_count
- Returns a list:
not |
A logical vector of all rows not covered (row sums equal zero) |
covered |
A logical vector of all rows covered (row sums greater than zero) |
coverage |
The percentage rate of covered/(not + covered) |
n_covered |
The row sums of the unique terms |
total_terms |
The row sums of the terms |
hierarchical_covered* |
A hierarchical list (matching the |
hierarchical_n_covered* |
A hierarchical vector (matching the |
hierarchical_coverage* |
A hierarchical vector (matching the covered/(not + covered) |
*Only applies to term_count
output that was generated with a hierarchical term.list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | coverage(sample(c(TRUE, FALSE), 1000, TRUE))
data(presidential_debates_2012)
discoure_markers <- list(
like = c("love", "like"),
water = c("lake", "ocean", "water"),
justify = c("because"),
he = c("\\bhe", "him"),
we = c("\\bwe", "\\bus", "\\bour")
)
library(dplyr)
(markers2 <- with(presidential_debates_2012,
term_count(dialogue, TRUE, discoure_markers)
))
coverage(markers2)
presidential_debates_2012[coverage(markers2)$not, "dialogue"] %>%
c()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.