Description Usage Value Examples
Indicates if a string has a given pattern.
1 | has_pattern(x, pattern)
|
Logical. 'TRUE' indicates the string has a given pattern, 'FALSE' otherwise.
1 2 3 4 5 6 7 | library(stringi)
text <- dplyr::as_tibble(c('A designer knows that he has achieved perfection',
'not when there is nothing left to add',
'but when there is nothing left to take away.'))
has_pattern(text, 'nothing')
apply(text, 1, has_pattern, 'nothing')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.