rx_find: Match an expression.

Description Usage Arguments References Examples

View source: R/rules.R

Description

Identify a specific pattern exactly.

Usage

1
rx_find(.data = NULL, value)

Arguments

.data

Expression to append, typically pulled from the pipe %>%

value

Exact expression to match

References

Capturing group: https://www.regular-expressions.info/brackets.html

Stack Overflow: https://stackoverflow.com/questions/3512471

Examples

1
2
3
4
5
6
7
rx_find(value = "apple")

# create expression
x <- rx_find(value = "apples")

grepl(x, "apple")  # should be false
grepl(x, "apples") # should be true

RVerbalExpressions documentation built on Nov. 6, 2019, 5:08 p.m.