multi_filt: Multi Filt

View source: R/data-multi_filt.R

multi_filtR Documentation

Multi Filt

Description

Filter across multiple variables.

Usage

multi_filt(data, vars, filts)

Arguments

data

data

vars

variables

filts

filters

Details

NOTE: this function currently only supports character and factor level filtering by using the dplyr::filter(<var> %in% c(<filts>)) syntax. For numeric and date level filtering will need to incorporate expressions like <= 5 as filt arguments.

Value

a filtered data.frame or tibble.

References

dplyr::filter() rlang tidyeval tidyeval glue syntax

Examples

library(dplyr)
data <- datasets::iris
str(data)

iris_filtered <- multi_filt(data, vars = list("Species"), filts = list(c("setosa", "versicolor")))

str(iris_filtered) # filtered for only Species %in% c("setosa" and "versicolor")

jimbrig2011/jimstools documentation built on Sept. 14, 2022, 1:38 a.m.