One can imagine behaviour of this module in the following way: A tree of height m is created. We begin at the top of the tree with the entire data.table. A category (column) from a data.table is chosen via uiSequence. Each value of this fixed category determines a subtable of the data.table. For each value choice a child node is created and receives the value choice. Therefore, every child node implicitly receives a subtable corresponding to the received value choice. Child node also receives an information from user which category should be fixed next. It then performs the same calculations as the top node, but based on the implicitly received subtable. Simultaneously, for each node desired UI (e.g., tabs) is created. If no information about next category to fix is provided for a node, it assumes it is a leaf. At the end, at each leaf, a summary function is applied. Note that each leaf (and each node) receives the entire data.table and the information about chosen values leading to this leaf (node). Hence, summary can be based on implicitly determined subtable, but also based on entire data.table or some subtable determined by a subset of chosen values.

slicerUI(id)

slicer(input, output, session, datatable, uiSequence, serverFunction,
uiFunction, ...)

## Arguments

id An id string that corresponds with the id used to call the module's UI function. shiny server input object shiny server output object shiny server session object A reactive data.table. A data.table with columns category, uiType, and (optionally) possibleValues. Both lists should contain elements of type character. The category column should contain names of the categories which will be subsequently fixed. The uiType column should contain corresponding UI which should be applied for each category choice. The possibleValues column should contain a list of the possible values for category. If not supplied, possible values for each level of the list will be determined based on the data. Currently there are two possible UI types to perform: "tab" and "box", which both make use of shinydashboard. A summary module server function. This function should take, at minimum, the following arguments: datatable and id. Additional named arguments are passed via .... Users have access to the full data.table if they need it (e.g., to calculate histogram breaks) via .dtFull, as well as a list of the currently selected category values via .current. Inside the function there should be a call to a shiny module server function using the id. See example section and compare with link[shiny]{callModule}). A summary module function UI taking one argument: id. Note: the id value is generated internally. Inside the function there should be a call to shiny module UI function. See example section. Additional arguments passed to serverFunction.

## Value

Shiny module UI.

Shiny module server function.