Skip to contents

A module that creates the following plots with its corresponding menus:

Usage

wfphm_UI(id, tr_choices = names(tr_mapper_def()))

wfphm_server(
  id,
  bm_dataset,
  group_dataset,
  cat_var = "PARCAT1",
  par_var = "PARAM",
  visit_var = "AVISIT",
  subjid_var = "SUBJID",
  value_vars = c("AVAL", "CHG", "PCHG", "log2AVAL", "log2CHG", "log2PCHG", "log10AVAL",
    "log10CHG", "log10PCHG"),
  bar_group_palette = list(),
  cat_palette = list(),
  tr_mapper = tr_mapper_def(),
  show_x_ticks = TRUE
)

mod_wfphm(
  module_id,
  bm_dataset_name,
  group_dataset_name,
  cat_var = "PARCAT1",
  par_var = "PARAM",
  visit_var = "AVISIT",
  subjid_var = "SUBJID",
  value_vars = c("AVAL", "CHG", "PCHG", "log2AVAL", "log2CHG", "log2PCHG", "log10AVAL",
    "log10CHG", "log10PCHG"),
  bar_group_palette = list(),
  cat_palette = list(),
  tr_mapper = tr_mapper_def(),
  show_x_ticks = TRUE,
  bm_dataset_disp,
  group_dataset_disp
)

Arguments

id

Shiny ID [character(1)]

tr_choices

the names of the entries in tr_mapper

bm_dataset

[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]

It expects the following format:

  • it contains, at least, the columns specified in the parameters: cat_var, par_var, value_vars, visit_var and subjid_var

  • cat_var, par_var, visit_var and subjid_var columns are factors

  • It contains at least 1 row

group_dataset

[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]

It expects the following format:

  • it contains, at least, the columns specified in the parameters: subjid_var

  • subjid_var columns is a factors

  • It contains at least 1 row

cat_var, par_var, visit_var, subjid_var

[character(1)]

columns used as indicated in each of the subplots

value_vars

[character(1+)]

possible colum values. If column is labelled, label will be displayed in the value menu

bar_group_palette

[list(palettes)]

list of custom palettes to apply to bar_grouping. It receives the values used for grouping and must return a DaVinci palette. Each palette is applied when the name of the entry in the list matches the name of the column used for grouping

cat_palette

[list(functions)]

list of functions that receive the values of the variale and returns a vector with the colors for each of the values. Each palette is applied when the name of the entry in the list matches the name of the selected categorical variable

tr_mapper

[function(1+)]

named vector containing a set of transformation where the name is the string shown in the selector and the value is function to be applied according to details section.

show_x_ticks

[logical(1)]

show x ticks in the parameter heatmap

module_id

Shiny id

bm_dataset_name, group_dataset_name

The name of the dataset

bm_dataset_disp, group_dataset_disp

Dataset dispatcher. This parameter is incompatible with its bm_dataset_name/group_dataset_name counterpart. Only for advanced use.

Value

UI

The menus and plots

Server

NULL

Details

See the subsections for each of plots particularities

X axis

All charts share the same x-axis order as defined by the value sorted_x returned by the wfphm_wf.

Margins

All four plots are aligned on their left and right sides so their x axis are also aligned. Each plot returns their required margins and we calculate the maximum for each side and return it in the margin argument of each plot.

Functions

  • wfphm_UI(): UI

  • wfphm_server(): server

  • mod_wfphm(): dv.manager wrapper for the module