Description Usage Arguments Value Examples
View source: R/str_extract_context.R
#' Vectorised over 'string', 'pattern', and 'window_size'.
1 | str_extract_context(string, pattern, window_size = 10)
|
string |
The string from which to extract. |
pattern |
Pattern to look for. |
window_size |
Number of characters to return before and after the pattern. |
A character vector with pattern matches and their context.
1 2 | test_string <- 'To be or not to be, that is the question.'
str_extract_context(test_string, pattern = 'be', window_size = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.