View source: R/context_grabber.R
context_grabber | R Documentation |
Boundaries are broken up by spaces (super basic)
context_grabber(
data,
text_var = mention_content,
pattern,
range_before = 5,
range_after = 10,
show_pattern = FALSE
)
data |
Data frame or tibble object |
text_var |
Name of the text variable |
pattern |
Pattern to search for - should be a character vector |
range_before |
Number of words before |
range_after |
Number of words after |
show_pattern |
Whether to print the pattern as well as the context tibble |
a tibble of the extracted contexts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.