Skip to contents

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.

Usage

edit_filter(filters, x, pattern = NULL, min = NULL, max = NULL)

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.

Value

filters with an edited row, provided that the necessary arguments are valid.

See also

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