shiny_vector_filter_factor_few {IDEAFilter}R Documentation

A vector filter for factors with only a few choices

Description

A vector filter for factors with only a few choices

Usage

shiny_vector_filter_factor_few(
  input,
  output,
  session,
  x = shiny::reactive(factor()),
  filter_na = shiny::reactive(TRUE),
  filter_fn = NULL,
  verbose = FALSE,
  erase_filters = shiny::reactive(0)
)

Arguments

input

requisite shiny module field specifying incoming ui input reactiveValues

output

requisite shiny module field capturing output for the shiny data filter ui

session

requisite shiny module field containing the active shiny session

x

a reactive expression resolving to the vector to filter

filter_na

a logical value indicating whether to filter NA values from the x vector

filter_fn

A function to modify, specified in one of the following ways: * A named function, e.g. 'mean'. * An anonymous function, e.g. '\(x) x + 1' or 'function(x) x + 1'. * A formula, e.g. '~ .x + 1'.

verbose

a logical value indicating whether or not to print log statements out to the console

Value

a reactiveValues list containing a logical vector called "mask" which can be used to filter the provided vector and an element "code" which is the expression used to generate the mask.


[Package IDEAFilter version 0.2.0 Index]