filter_by: A convenience function for filtering using quoted variable...

Description Usage Arguments Value Examples

Description

A convenience function for filtering using quoted variable names

Usage

1
filter_by(data_frame, var_name, level_names, exclude = FALSE)

Arguments

data_frame

The data frame

var_name

The quoted name of the variable to use for filtering.

level_names

The values (typically factor levels) of the variable that you want to keep in the data, as vector of quoted value names. Or, if you set exclude = TRUE, the variables you want to throw away.

exclude

If TRUE, throw out rows with values listed in level_names. If FALSE, keep rows with values listed in level_names.

Value

A filtered data frame

Examples

1
2
3
4
5
6
## Not run: 
shown %<>% filter_by(
  var_name = "Vendor.Size",
  level_names = input$vendor_size_filter)

## End(Not run)

CSISdefense/hamre documentation built on May 31, 2019, 7:58 a.m.