Skip to contents

Useful in concert with axis brushing

Usage

filter_to(filters, out_type = character(), .data)

Arguments

filters

list of named filters to use. Each filter is named by the column name with the range as a length two numeric vector

out_type

obj of desired output type

.data

tbl data to use if out_type = logical()/data.frame()

Value

obj of same class as out_type

Examples

f <- list(wt = c(1,5))
d <- data.frame(wt = 1:10)
filter_to(f)
#> wt: 1 - 5 
#>      "wt" 
filter_to(f, out_type = data.frame(), .data = d)
#>   wt
#> 1  1
#> 2  2
#> 3  3
#> 4  4
#> 5  5