matches: Matches.

Description Usage Arguments Value Examples

Description

Infix operator to check if a character vector matches an R regular expression.

Usage

1
lhs %matches% rhs

Arguments

lhs

The character vector to search; the haystack.

rhs

The R regular expression; the needle.

Value

Logical vector indicating a match.

Examples

1
2
virginica_df <- iris %>%
  dplyr::filter(Species %matches% "^vir")

curtisalexander/CRAmisc documentation built on May 14, 2019, 12:52 p.m.