where: Filter where the columns match 'str_detect'

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Uses str_detect to filter the rows that match the regular expression

Usage

1
where(df, ..., .negate = FALSE, .op = NULL)

Arguments

df

The tibble or dataframe to use

...

The conditions to test each row. It uses the folowing syntax to filter rows:

<column> = <regex>

.negate

Wether to negate the result of str_detect

.op

The operation to use when evaluating multiple column value pairs. By defult it is NULL and acts like `&`.

Details

Use .op=NULL instead of .op=`&` as the later uses the reduce function.

Value

A tibble that has rows that matches the given conditions

Author(s)

zekrom_vale

See Also

filter_na Filters a tibble where the vlaues are NA

filter_not_na Filters a tibble where the vlaues are not NA

where Filters a tibble matching regular expressions

Examples

1
2
df=tibble(name=c("ABC", "123", "EDF", "456", "#@!", "GFSD"))
where(df, name="[[:alpha:]]")

zekrom-vale/zUtil.R documentation built on June 2, 2019, 10:57 p.m.