Learn R Programming

hacksaw (version 0.0.2)

filter_pattern: Grep and filter a data frame by pattern

Description

Grep and filter a data frame by pattern

Usage

filter_pattern(.data, col, pattern, ...)

Arguments

.data

a table of data.

col

a variable.

pattern

string containing a regular expression to be matched in the given character vector.

...

additional arguments passed to grepl

Value

a data frame.

Examples

Run this code
# NOT RUN {
library(dplyr)
starwars %>% filter_pattern(homeworld, "oo")
# }

Run the code above in your browser using DataLab