gui-filter-layer: Return GUI layer methods for filter of specified type

gui-filter-layerR Documentation

Return GUI layer methods for filter of specified type

Description

For each filter type '.gui_filter' method should return a list of the below objects:

  • input - UI structure defining filter input controllers.

  • feedback - List defining feedback plot output.

  • server - Optional server-side expression attached to filter panel (e.g. filter specific observers).

  • update - An expression used for updating filter panel based on its configuration.

  • post_stats - TRUE if post statistics are displayed in filter controller (e.g. for discrete filter). If FALSE, some operations are skipped which results with better performance.

  • multi_input - TRUE if multiple input controllers are used for providing filter value (e.g. range input where both numericInput and sliderInput are used). If FALSE, some operations are skipped which results with better performance.

If you want to learn more about creating filter layers see 'vignette("gui-filter-layer")'.

Usage

.gui_filter(filter, ...)

## S3 method for class 'discrete'
.gui_filter(filter, ...)

## S3 method for class 'range'
.gui_filter(filter, ...)

## S3 method for class 'date_range'
.gui_filter(filter, ...)

## S3 method for class 'discrete_text'
.gui_filter(filter, ...)

## S3 method for class 'multi_discrete'
.gui_filter(filter, ...)

## S3 method for class 'query'
.gui_filter(filter, ...)

Arguments

filter

Filter object.

...

Extra arguments passed to a specific method.

Value

List consisting filter metadata and methods that allow to perform filter based operations. See 'vignette("custom-filters")'.

See Also

source-gui-layer

Examples

library(cohortBuilder)
librarian_source <- set_source(as.tblist(librarian))
copies_filter <- filter(
  "range", id = "copies", name = "Copies", dataset = "books",
  variable = "copies", range = c(5, 12)
)
copies_filter_evaled <- copies_filter(librarian_source)
copies_filter_evaled$gui <- .gui_filter(copies_filter_evaled)

str(copies_filter_evaled$gui)


shinyCohortBuilder documentation built on Oct. 14, 2024, 5:08 p.m.