Learn R Programming

k5 (version 0.2.1)

filter_rx: Filter a data frame by a regular expression

Description

A shortcut for dat %>% filter(str_detect(column, "\\d")).

Usage

filter_rx(dat, col, pattern, ...)

Value

A subset of rows from dat.

Arguments

dat

A data frame with a character column to filter.

col

The column containing a character vector to input.

pattern

Pattern to look for..

...

Additional arguments passed to stringr::str_detect().