has_pattern: Indicates if a string has a given pattern.

Description Usage Value Examples

View source: R/has_pattern.R

Description

Indicates if a string has a given pattern.

Usage

1

Value

Logical. 'TRUE' indicates the string has a given pattern, 'FALSE' otherwise.

Examples

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')

filipezabala/jurimetrics documentation built on Aug. 28, 2020, 1:37 p.m.