Edit a filter for a data frame, by editing a row of a data frame, where each row represents a filter. If your edit results in an invalid filter, the edit does not succeed.
Arguments
- filters
A data frame of filters. See filters_init.
- x
A number specifying the filter number to edit (indexed at 1).
- pattern
A string.
- min
A number.
- max
A number.
See also
filters_init for the filters table.
add_filter()
andremove_filter()
to further edit the filters table.apply_filters()
to apply the filters you have created to your data.
Examples
data <- tibble::tibble(
x = 1:10,
y = "a"
)
filters <- add_filter(filters_init, "x", data)
edit_filter(filters, 1, min = 1, max = 5)
#> # A tibble: 1 × 5
#> type colname pattern min max
#> <chr> <chr> <chr> <dbl> <dbl>
#> 1 numeric x NA 1 5