Skip to contents

Server for the Tplyr_table module

Usage

Tplyr_table_server(
  module_id,
  dataset_list,
  output_list,
  dataset_metadata,
  subjid_var,
  default_vars,
  intended_use_label,
  pagination,
  on_sbj_click = NULL,
  review = NULL
)

Arguments

module_id

[character(1)]

A character string that serves as unique identifier for the module.

dataset_list

[shiny::reactive(list(data.frame)]

A reactive list of data.framish dataset(s) that will be used to create the table and the listing(s).

output_list

[list(list())]

A named list defining the outputs to be generated. Each element of the list corresponds to a table or listing and must be a named list with one of the following structures:

For summary tables:

tplyr_tab_fun

A function that takes one or more datasets as input and returns a tplyr_table object.

build_fun

A function that takes the tplyr_table object and returns a built table (typically using Tplyr::build()). The metadata argument of Tplyr::build() needs to be set to TURE, so that the corresponding listing can be shown.

For listings:

dataset_names

A character vector of dataset names required to generate the listing.

The names of the top-level list elements are used as identifiers for the outputs.

dataset_metadata

[list(character(1), character(1+))] A list with the following two elements: dataset_metadata$name() containing a reactive string specifying the name of the selected dataset and dataset_metadata$date_range() containing a reactive character vector with two entries specifying the earliest and latest modification date in the dataset. Usually obtained from module manager.

subjid_var

[character(1) | NULL]

Column corresponding to subject ID. Default value is 'USUBJID'

default_vars

an argument of listings_server of dv.listings will be passed through.

intended_use_label

an argument of listings_server of dv.listings will be passed through.

pagination

an argument of listings_server of dv.listings will be passed through.

on_sbj_click

an argument of listings_server of dv.listings will be passed through.

review

an argument of listings_server of dv.listings will be passed through.