modFilter: modFilter Module

View source: R/modFilter.R

modFilterR Documentation

modFilter Module

Description

Shiny module which works together with modFilterUI to filter a data set based on user input

Usage

modFilter(
  input,
  output,
  session,
  data,
  exclude = NULL,
  showAll = FALSE,
  multiple = NULL,
  xdata = NULL,
  xdataExclude = NULL,
  order = NULL,
  name = NULL,
  preselectYear = NULL,
  preselectMinDate = NULL
)

Arguments

input, output, session

Default input, output and session objects coming from shiny

data

A reactive returning a data.table with observations in rows and filter options in columns

exclude

names of columns that should be not used as filter

showAll

FALSE | If set to TRUE all available filter are shown and the filter selector is hidden

multiple

vector with booleans for each filter defining whether multiple selections are allowed or not. If information is not provided it is assumed that multiple selection is allowed

xdata

additional data.tables which should be filtered by the same rules as data. If provided the format of the return value changes

xdataExclude

similar to exclude a vector of filters that should be ignored for xdata. Useful if xdata should only filtered for a subset of filters applied to data

order

order the filter should be listed (provided as a vector of filter names). Filter not listed here will be shown after the ones mentioned.

name

name used to identify the filter in the log

preselectYear

if provided the year filter will be preselected with this value

preselectMinDate

if provided the date filter will be preselected with this as lower value

Value

a reactive list with x as the filtered data and xdata containing the list of additional, filtered data element.

Author(s)

Jan Philipp Dietrich

See Also

modFilterUI, appModelstats


pik-piam/shinyresults documentation built on Jan. 28, 2024, 4:19 p.m.