DataSelector: DataSelector

Description Usage Format Usage Methods

Description

R6Class for generating customised selections of groups, datasets and columns. After initialing the DataSelector an arbitrary amout of elements may be added in the shiny server function. After adding all elements the DataSelector gets activated by invoking the method this$callModule(). The display of the elements is handled by data_selector_output. For each element of a DataSelector data_selector_output has to be called either in the ui function or inside of renderUI to display the UI of the corresponding element.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DataSelector$new(
  id = "data_selector"
)$Group(
  id = "group",
  label = "Select group"
)$Dataset(
  id = "dataset",
  group_id = "group",
  label = "Select dataset"
)$Column(
  id = "column_1",
  group_id = "group",
  dataset_id = "dataset",
  label = "Select column 1",
  setdiff_id = "column_2"
)$Column(
  id = "column_2",
  group_id = "group",
  dataset_id = "dataset",
  label = "Select column 2",
  setdiff_id = "column_1"
)$callModule(
  .values = values,
  .parent = parent
)

Methods

new(id)

Initialize the data_selector.

id The id of the data_selector.
callModule(.values, .parent)

Activate the data_selector inside the server function. Before calling this function NO ui will be displayed.

.values List of reactive-like objects as specified by XXX.
.parent Node.
Column(id, group_id, dataset_id, label, extended = TRUE, setdiff_id = NULL, multiple = FALSE)

Add a selectInput for selecting a column of a dataset.

id Character. The id of the column element.
group_id Character. The id of the parent group element.
dataset_id Character. The id of the parent dataset element.
label The label of the selectInput.
extended Logical. If TRUE, the label of the selectInput is extended by a data_selector_column_dropdown.
setdiff_id Character vector. The value of the selectInput is compared to the values of all column elements with id %in% setdiff_id. If one of these elements has the same value, this element's selectInput gets updated to the first free column. If multiple = TRUE, no comparison is done.
multiple Logical. If TRUE, multiple columns can be selected.
Dataset(id, group_id, label, extended = TRUE)

Add a selectInput for selecting a dataset of a group.

id The id of the dataset element.
group_id The id of the parent group element.
label The label of the selectInput.
extended Logical. If TRUE, the label of the selectInput is extended by a data_selector_dataset_dropdown.
Group(id, label, extended = TRUE)

Add a selectInput for selecting a group.

id The id of the group element.
label The label of the selectInput.
extended Logical. If TRUE, the label of the selectInput is extended by a data_selector_column_dropdown.

DavidBarke/QWUtils documentation built on Jan. 13, 2020, 11:52 a.m.