like: Binary operators for regexp string comparisons.

Description Usage Arguments Functions See Also Examples

Description

Inspired by the "like" operator in SQL, these binary operators are a convenient way of using grepl.

Usage

1
2
3
4
5
6
7
x %like% y

x %Like% y

x %unlike% y

x %Unlike% y

Arguments

x

character vector to search

y

regular expression

Functions

See Also

grepvi

Examples

1
2
3
4
5
lets = c(letters, LETTERS)
lets[lets %like% '[aeiou]']
lets[lets %Like% '[aeiou]']
lets[lets %unlike% '[aeiou]']
lets[lets %Unlike% '[aeiou]']

stevetnz/stevesRfunctions documentation built on May 28, 2019, 8:21 a.m.