uncovered: Uncovered/Untagged Group Variable

Description Usage Arguments Value Note Examples

View source: R/uncovered.R

Description

uncovered - Get logical vector of uncovered data from the original text used to build the model.

get_uncovered - Get text vector from the uncovered data of the original text used to build the model.

Usage

1
2
3

Arguments

x

A term_count object.

...

ignored.

Value

uncovered - Returns logical indeices of untagged/uncovered group variables.

get_uncovered - Returns a vector of uncovered text from the original data set used to train the model.

Note

This is most useful when grouping.var = TRUE and an id variable was created that corresponds to the text variable. This allows the user to quickly grab the untagged text.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(dplyr)

untagged <- presidential_debates_2012 %>%
     with(., term_count(dialogue, TRUE, list(manners = c("please|excuse|sorry")))) %>%
     uncovered() %>%
     {presidential_debates_2012[., "dialogue"]} %>%
     unlist(use.names = FALSE)

## Shorthand equivalent to code chunk above
untagged <- presidential_debates_2012 %>%
     with(., term_count(dialogue, TRUE, list(manners = c("please|excuse|sorry")))) %>%
     get_uncovered()

frequent_terms(untagged)
search_term(untagged, colo("romney", "governor"))

search_term(untagged, colo("people")) %>%
    frequent_terms()

trinker/termco documentation built on Jan. 7, 2022, 3:32 a.m.