grapes-pin-grapes: Partial in

Description Usage Arguments Value Examples

Description

Analogue of %in% but indicating partial match of the left operand.

Usage

1
x %pin% Y

Arguments

x

The values to be matched. Same as %in%.

Y

A vector of values (perl regular expressions) to be matched against.

Value

TRUE for every x for which any grepl is TRUE.

Examples

1
2
3
x <- c("Sydney Airport", "Melbourne Airport")

x %pin% c("Syd", "Melb")

hutils documentation built on Aug. 20, 2018, 9:04 a.m.