This module produces a patient profile laboratory table using ADaM datasets.
Usage
tm_t_pp_laboratory(
label,
dataname = "ADLB",
parentname = "ADSL",
patient_col = "USUBJID",
timepoints = NULL,
aval = lifecycle::deprecated(),
aval_var = NULL,
avalu = lifecycle::deprecated(),
avalu_var = NULL,
param = NULL,
paramcd = NULL,
anrind = NULL,
pre_output = NULL,
post_output = NULL,
transformators = list(),
decorators = lifecycle::deprecated()
)Arguments
- label
(
character)
menu item label of the module in the teal app.- dataname
(
character)
analysis data used in teal module.- parentname
(
character)
parent analysis data used in teal module, usually this refers toADSL.- patient_col
(
character)
name of patient ID variable.- timepoints
(
teal.transform::choices_selected())
object with all available choices and preselected option for the time variable fromdataname.- aval
- aval_var
(
teal.transform::choices_selected())
object with all available choices and pre-selected option for the analysis variable.- avalu
- avalu_var
(
teal.transform::choices_selected())
object with all available choices and preselected option for the analysis unit variable.- param
(
teal.transform::choices_selected())
object with all available choices and preselected option for thePARAMvariable fromdataname.- paramcd
(
teal.transform::choices_selected())
object with all available choices and preselected option for the parameter code variable fromdataname.- anrind
(
teal.transform::choices_selected())
object with all available choices and preselected option for theANRINDvariable fromdataname. Variable should have the following 3 levels:"HIGH","LOW", and"NORMAL".- pre_output
(
shiny.tag) optional,
with text placed before the output to put the output into context. For example a title.- post_output
(
shiny.tag) optional,
with text placed after the output to put the output into context. For example theshiny::helpText()elements are useful.- transformators
(
listofteal_transform_module) that will be applied to transform module's data input. To learn more checkvignette("transform-input-data", package = "teal").- decorators
-
(named
listof lists ofteal_transform_module) optional, decorator for tables or plots included in the module output reported. The decorators are applied to the respective output objects.See section "Decorating Module" below for more details.
Reporting
This module returns an object of class teal_module, that contains a server function.
Since the server function returns a teal_report object, this makes this module reportable, which means that
the reporting functionality will be turned on automatically by the teal framework.
For more information on reporting in teal, see the vignettes:
vignette("reportable-shiny-application", package = "teal.reporter")vignette("adding-support-for-reporting-to-custom-modules", package = "teal")
Examples
data <- teal_data()
data <- within(data, {
ADSL <- tmc_ex_adsl
ADLB <- tmc_ex_adlb
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
ADSL <- data[["ADSL"]]
ADLB <- data[["ADLB"]]
app <- init(
data = data,
modules = modules(
tm_t_pp_laboratory(
label = "Vitals",
dataname = "ADLB",
patient_col = "USUBJID",
paramcd = choices_selected(
choices = variable_choices(ADLB, "PARAMCD"),
selected = "PARAMCD"
),
param = choices_selected(
choices = variable_choices(ADLB, "PARAM"),
selected = "PARAM"
),
timepoints = choices_selected(
choices = variable_choices(ADLB, "ADY"),
selected = "ADY"
),
anrind = choices_selected(
choices = variable_choices(ADLB, "ANRIND"),
selected = "ANRIND"
),
aval_var = choices_selected(
choices = variable_choices(ADLB, "AVAL"),
selected = "AVAL"
),
avalu_var = choices_selected(
choices = variable_choices(ADLB, "AVALU"),
selected = "AVALU"
)
)
)
)
#> Initializing tm_t_pp_laboratory
if (interactive()) {
shinyApp(app$ui, app$server)
}