bound_rx | R Documentation |
Passing a list of patterns to a 'stringr' function that do not match the length of the 'text' argument yields unexpected results. Converting the expression with a 'map' function is cumbersome and sometimes slow. This transformation solves that problem and may provide an increase in speed Using 'fixed()' and a 'map'function may be faster but will match different things.
bound_rx(rx_var, leftbound = "\\b", rightbound = "\\b", by_element = FALSE)
rx_var |
A charater vector |
by_element |
An atomic character vector with a valid regex
Find all individual letters in a text regardless of case. sample_text <- c("ag;als", "w a;lsg;lak B", "l A jlajksf k") str_count(sample_text, bound_rx(letters))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.