Resets all inputs created by uniform_stats_inputs_ui() to their default
values. Call inside an observeEvent(input$reset, ...) block.
Arguments
- session
The Shiny session object (from
moduleServer).- defaults
A named list of default values to reset to, or NULL to use hardcoded fallbacks. Typically the same list passed to the UI function.
- pair_strings
Character vector of the comparisons currently on offer in the Comparisons selector. Those named by
defaults$stat.pairsare reselected (seedefault_stat_pairs());NULLclears the selection.
Examples
if (FALSE) { # \dontrun{
# Inside a module server:
observeEvent(input$reset, {
reset_stats_inputs(session, defaults, pair_strings = pair_choices())
})
} # }