filter_by_pattern: Filter a data frame by values matching a pattern

Description Usage Arguments Value Examples

Description

Filter a data frame by values matching a pattern

Usage

1
filter_by_pattern(df, colname, pattern, exclude = FALSE, ignore.case = TRUE)

Arguments

df

A data frame

colname

String column name on which to filter

pattern

Regular expression pattern to match for filtering

exclude

Exclude cases matching pattern? Defaults to FALSE.

ignore.case

Boolean whether string searches should be case-insensitive

Value

a filtered data frame

Examples

1
filter_by_pattern(iris, "Species", "v.r")

brianwonch/mediamunger documentation built on May 13, 2019, 7:42 a.m.