replyr_filter: Filter a tbl on a column having values in a given set.

Description Usage Arguments Value Examples

View source: R/filter.R

Description

Filter a tbl on a column having values in a given set.

Usage

1
2
3
4
5
6
7
8
replyr_filter(
  x,
  cname,
  values,
  ...,
  verbose = TRUE,
  tempNameGenerator = mk_tmp_name_source("replyr_filter")
)

Arguments

x

tbl or item that can be coerced into such.

cname

name of the column to test values of.

values

set of values to check set membership of.

...

force later arguments to bind by name.

verbose

logical if TRUE echo warnings

tempNameGenerator

temp name generator produced by wrapr::mk_tmp_name_source, used to record dplyr::compute() effects.

Value

new tbl with only rows where cname value is in values set.

Examples

1
2
3
4
values <- c('a','c')
d <- data.frame(x=c('a','a','b','b','c','c'),y=1:6,
                stringsAsFactors=FALSE)
replyr_filter(d,'x',values)

WinVector/replyr documentation built on Oct. 22, 2020, 8:07 p.m.