textstat_context | R Documentation |
Identify context words using user-provided patterns
textstat_context( x, pattern, valuetype = c("glob", "regex", "fixed"), case_insensitive = TRUE, window = 10, min_count = 10, remove_pattern = TRUE, n = 1, skip = 0, ... ) char_context( x, pattern, valuetype = c("glob", "regex", "fixed"), case_insensitive = TRUE, window = 10, min_count = 10, remove_pattern = TRUE, p = 0.001, n = 1, skip = 0 )
x |
a tokens object created by |
pattern |
|
valuetype |
the type of pattern matching: |
case_insensitive |
if |
window |
size of window for collocation analysis. |
min_count |
minimum frequency of words within the window to be considered as collocations. |
remove_pattern |
if |
n |
integer vector specifying the number of elements to be concatenated in each n-gram. Each element of this vector will define a n in the n-gram(s) that are produced. |
skip |
integer vector specifying the adjacency skip size for tokens
forming the n-grams, default is 0 for only immediately neighbouring words.
For |
... |
additional arguments passed to |
p |
threshold for statistical significance of collocations. |
tokens_select()
and textstat_keyness()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.