Skip to contents

mod_boxplot is a Shiny module prepared to display data with boxplot charts with different levels of grouping. It also includes a set of listings with information about the population, distribution and statistical comparisons.

Input dataframes:

bm_dataset

It expects a dataset similar to https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192 , 1 record per subject per parameter per analysis visit.

It must contain, at least, the columns passed in the parameters, subjid_var, cat_var, par_var, visit_var and value_var. The values of these variables are as described in the CDISC standard for the variables USUBJID, PARCAT, PARAM, AVISIT and AVAL.

group_dataset

It expects a dataset with an structure similar to https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806 , one record per subject.

It must contain, at least, the column passed in the parameter, subjid_var.

Usage

boxplot_UI(id)

boxplot_server(
  id,
  bm_dataset,
  group_dataset,
  dataset_name = shiny::reactive(character(0)),
  cat_var = "PARCAT",
  par_var = "PARAM",
  value_vars = c("AVAL", "CHG", "PCHG"),
  visit_var = "AVISIT",
  subjid_var = "SUBJID",
  default_cat = NULL,
  default_par = NULL,
  default_visit = NULL,
  default_value = NULL,
  default_main_group = NULL,
  default_sub_group = NULL,
  default_page_group = NULL,
  on_sbj_click = function(x) {
 }
)

mod_boxplot(
  module_id,
  bm_dataset_name,
  group_dataset_name,
  receiver_id = NULL,
  cat_var = "PARCAT",
  par_var = "PARAM",
  value_vars = c("AVAL", "CHG", "PCHG"),
  visit_var = "AVISIT",
  subjid_var = "SUBJID",
  default_cat = NULL,
  default_par = NULL,
  default_visit = NULL,
  default_value = NULL,
  default_main_group = NULL,
  default_sub_group = NULL,
  default_page_group = NULL,
  bm_dataset_disp,
  group_dataset_disp,
  server_wrapper_func = identity
)

mod_boxplot_papo(...)

Arguments

id

Shiny ID [character(1)]

bm_dataset, group_dataset

[data.frame()]

Dataframes as described in the Input dataframes section

dataset_name

[shiny::reactive(*)]

a reactive indicating when the dataset has possibly changed its columns

cat_var, par_var, visit_var,

[character(1)]

Columns from bm_dataset that correspond to the parameter category, parameter and visit

value_vars

[character(n)]

Columns from bm_dataset that correspond to values of the parameters

subjid_var

[character(1)]

Column corresponding to subject ID

default_cat, default_par, default_visit, default_value, default_main_group, default_sub_group, default_page_group

[character(1)|NULL]

Default values for the selectors

on_sbj_click

[function()]

Function to invoke when a subject is clicked in the single subject listing

module_id

[character(1)]

Module Shiny id

bm_dataset_name, group_dataset_name

[character(1)]

Name of the dataset

receiver_id

Name of the tab containing the receiver module

bm_dataset_disp, group_dataset_disp

[mm_dispatcher(1)]

Dataset dispatcher. This parameter is incompatible with its *_dataset_name counterpart. Only for advanced use.

server_wrapper_func

[function()]

A function that will be applied to the server returned value. Only for advanced use. See the example in mod_box_plot_papo

...

Same set of parameters as mod_boxplot

Functions

  • boxplot_UI(): UI

  • boxplot_server(): Server

  • mod_boxplot_papo(): Boxplot wrapper when its output is fed into papo module