shinyfilters (development version)
- Updates for compatibility with S7 > 0.2.2.
New API
shinyfilters() is a new function to configure filters. It displays an informative print and allows for configuration without extending methods directly. The functions listed here support shinyfilters objects (#111).
View data
-
print()displays the current configuration and if/how any settings were applied. -
as.data.frame(),as_tibble(), andas.data.table()return the data.frame behind a configuration (#105).
Choose columns
-
[keeps only the selected columns of a configuration (#105). -
[[, and$return the input for one column of a configuration (#105). - The tidyselect helpers, such as
everything()andwhere(), are optionally supported in[and[[.
Add, remove, or modify filters
-
with_filters()chooses the input for columns, and adds or replaces computed columns (#105, #111). -
with_args()sets the arguments of columns’ inputs (#105, #134). -
.update_fn = fn, among an input’s arguments, names the function that updates an input shinyfilters doesn’t know, such asshiny::updateCheckboxGroupInputforshiny::checkboxGroupInput(#105). -
with_filters()gives a shinyWidgets input, such asshinyWidgets::pickerInput, its own update function, so it needs no.update_fn(#34).
Update defaults
-
with_defaults()sets or removes the arguments a configuration passes tofilterInput()for every column (#105). -
with_ns()sets or removes the namespace of a configuration (#105).
Run the server
-
shinyfilters_server()is the new name ofserverFilterInput(), and also returns the filtered data, asfiltered. Itsinputargument is deprecated: omit it, or passsession(#105). -
shinyfilters_server()updates the inputs of a configuration asupdateFilterInput()does, and reads and updates the inputs of its namespace wherever it is called (#105). -
updateFilterInput()updates the inputs of a configuration, each with the function and arguments that match the input its column uses (#105).
Other new features
- Error and warning messages use cli formatting.
-
nyc_flightsis a new example dataset of flights departing New York City (#36).
Minor improvements
- shinyfilters now works with S7 0.1.0 (#113).
-
arg_name_input_id()andarg_name_input_label()now return"inputId"and"label"for anxof any class, sowith_filters()can give a column of any class a radio or select input (#111).
Bugfixes
-
apply_filters()now drops a row whose filtered value is missing, instead of returning a row ofNAs, unlessNAis one of the filter’s values (#136). -
apply_filters()now keeps the attributes of a data frame’s columns, as it does for a tibble, soserverFilterInput()updates a column of a custom class with that class’supdateFilterInput()method (#136). -
args_update_filter_input()now leaves outstartandendwhenrange = TRUE, as it leaves out the value of every other input (#136). -
filterInput()now errors whenxis all missing. -
filterInput()’snsargument behaves likeshiny::NS(), accepting any argument. -
get_filter_logical()now filters a datetimexby a Dateval, the value of a date input, instead of keeping every element (#136). -
get_filter_logical()now filters anxthat isn’t a character, factor, or logical vector by a characterval, the value of a select or radio input, instead of keeping every element (#136). -
serverFilterInput()now leaves a radio input with no selection unselected when it updates its choices, instead of selecting the first one (#136).
shinyfilters 0.3.1
CRAN release: 2026-09-15
Bugfixes
-
get_filter_logical()now returnsrep(T, length(x))when a method is not defined. This behavior is a bandaid for the underlying issue:numericInput()returns a logical when the user blanks out the input. - Fixes issue in
get_filter_logical()that caused an error when an argument was provided toapply_filters()and a categorical filter had an active selection.
shinyfilters 0.3.0
CRAN release: 2026-01-17
Additions
- Added functions used internally to access argument names needed by
filterInput()(#40): - Arguments can now be passed to generics used in
args_filter_input()(#24, #56): - Implementations of
args_update_filter_input()can now return a value forinputId(or equivalent) ([#87])
Bugfixes
- Use
anyNA()for NA checks andinherits()for class checks, perjarl check .(@novica) - The error message now displays for invalid S7 list dispatches
- An error is now thrown when an implementation of
args_filter_input()returns a completely unnamed list -
updateFilterInput()now works when passingselected(or equivalent) as an argument -
selectedargument (or equivalent) is now always removed from the result ofargs_update_filter_input()(#90)
Performance
- Unnecessarily repeated calls to
apply_filters()were removed inserverFilterInput()(#92)
Documentation:
- All examples now correctly use
inputId(#17) - All outputs now display in
get_input_values()example (#18) - Borders have been removed in examples (#7)
- Hyperlinks added for all issues in NEWS (#26)
- Updated package title to be more precise (#22)
- Updated filterInput() description in README to match new title
shinyfilters 0.2.0
CRAN release: 2025-12-17
Additions:
-
get_input_values(): Generic to return multiple values from a shiny input object (#10, #5) -
get_input_ids(): Generic to return the names of the shiny input ids for an arbitrary objectx. Method provided for data.frames (#12) -
get_input_labels(): Same asget_input_ids(), but returns thelabelinstead ofinputId(#10).
Bugfixes
-
get_input_values()has been re-added; its erroneous removal was causing an error inserverFilterInput()(#10, #5).
Documentation:
-
args_update_filter_input()has been removed from the README’s list of extensible functions. - Renames air.yaml Github Action job: “pkgdown” –> “air”
- Adds to README instructions on installing release version
shinyfilters 0.1.0
CRAN release: 2025-12-17
Initial release of shinyfilters.
The package provides the following functions:
-
filterInput(): Create a shiny input from a vector or data.frame, with support for extension -
updateFilterInput(): Update a filter input created byfilterInput() -
serverFilterInput(): Server logic to update filter inputs for data.frames -
apply_filters(): Apply a list of filters to a data.frame -
args_filter_input(),args_update_filter_input(): Get default args forfilterInput()andupdateFilterInput(). -
call_filter_input(),call_update_filter_input(): Create calls tofilterInput()andupdateFilterInput(). -
get_filter_logical(): Compute a logical vector for filtering a data.frame column