detect_controller: Build a controller based on data

View source: R/conditional_filter-utils.R

detect_controllerR Documentation

Build a controller based on data

Description

Build a controller based on data

Usage

detect_controller(
  dat,
  session = getDefaultReactiveDomain(),
  labels = character(1),
  external = character(1),
  remove_na = FALSE,
  update = FALSE
)

logical_controller(
  dat,
  session,
  labels = "Various",
  external = character(1),
  ignore = character(1),
  remove_na = FALSE,
  update = FALSE
)

switch_controller(
  dat,
  method = "length",
  val = 1,
  external = character(1),
  ignore = character(1),
  remove_na = FALSE,
  logical = FALSE
)

Arguments

dat

The data supplied as dataframe or tibble.

session

Shiny session object.

labels

Labels for the controllers (defaults to the variable names). Must be a named vector where the names refer to the names of the original data.

external

reactiveValues assigning external filter variables to the module.

remove_na

Logical indicating whether NAs should be removed during filtering (defaults to FALSE).

update

Logical indicating whether ui controllers are ui- or server-side for updating the controllers ranges.

ignore

Character string/vector for variables to be ignored for filtering of the dataset.

method

Method to use for switch_controller condition (defaults to length).

val

Value to use for switch_controller condition (defaults to 1)

logical

Boolean to determine whether the switch_controller is constructed for logical values.

Value

Shiny controller call.


MartinSchobben/shinymods documentation built on June 7, 2022, 4:38 p.m.