Description Usage Arguments Value See Also Examples
View source: R/probe_colo_list.R
The task of determining the regexes used to feed a term_count
object's
term.list
requires careful exploration of term use in context. This
function generates a list of function calls for search_term_collocations
(a wrapper for search_term
+ frequent_terms
) with a user
predefined data set and term list. This allows the user to explore a list of
terms (such as from frequent_terms
) and the accompanying terms that
frequently collocate with these terms.
1 2 3 4 5 6 | probe_colo_list(
terms,
data.name,
copy2clip = getOption("termco.copy2clip"),
ldots = ""
)
|
terms |
A vector of regex terms to explore (often populated from
|
data.name |
A character vector of a data set's name that will serve as the search context. |
copy2clip |
logical. If codeTRUE uses |
ldots |
A string (starting with a comma) of additional arguments to
include in the |
Returns a string with the concatenated function calls. The print
method separates the concatenated string into new line function calls. If
copy2clip = TRUE
the calls are easily pasted for use in exploration
of the terms in the text data set.
Other probe functions:
probe_colo_plot_list()
,
probe_list()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | probe_colo_list(c("thank", "\\bthe", "ee"), "sam_i_am")
probe_colo_list(
c("thank", "\\bthe", "ee"),
"sam_i_am",
ldots = ", n = 10, min.char = 5"
)
txt <- presidential_debates_2012[["dialogue"]]
terms <- frequent_terms(txt)[["term"]]
probe_colo_list(terms, "txt")
## Not run:
probe_colo_list(terms, "txt", copy2clip = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.