Waterfall heatmap shiny module
wfphm.Rd
A module that creates the following plots with its corresponding menus:
A waterfall wfphm_wf
A heatmap for categorical variables wfphm_hmcat
A heatmap for continuous variables wfphm_hmcont
A heatmap that displays a set of parameters wfphm_hmpar
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
andsubjid_var
cat_var
,par_var
,visit_var
andsubjid_var
columns are factorsIt 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 factorsIt 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.
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.