tm_t_shift_by_grade {teal.modules.clinical} | R Documentation |
teal Module: Grade Summary Table
Description
This module produces a summary table of worst grades per subject by visit and parameter.
Usage
tm_t_shift_by_grade(
label,
dataname,
parentname = ifelse(inherits(arm_var, "data_extract_spec"),
teal.transform::datanames_input(arm_var), "ADSL"),
arm_var,
visit_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname,
subset = "AVISIT"), selected = "AVISIT", fixed = TRUE),
paramcd,
worst_flag_var =
teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset =
c("WGRLOVFL", "WGRLOFL", "WGRHIVFL", "WGRHIFL")), selected = "WGRLOVFL"),
worst_flag_indicator =
teal.transform::choices_selected(teal.transform::value_choices(dataname, "WGRLOVFL"),
selected = "Y", fixed = TRUE),
anl_toxgrade_var =
teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset =
c("ATOXGR")), selected = c("ATOXGR"), fixed = TRUE),
base_toxgrade_var =
teal.transform::choices_selected(teal.transform::variable_choices(dataname, subset =
c("BTOXGR")), selected = c("BTOXGR"), fixed = TRUE),
id_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname,
subset = "USUBJID"), selected = "USUBJID", fixed = TRUE),
add_total = FALSE,
total_label = default_total_label(),
drop_arm_levels = TRUE,
pre_output = NULL,
post_output = NULL,
na_level = default_na_str(),
code_missing_baseline = FALSE,
basic_table_args = teal.widgets::basic_table_args()
)
Arguments
label |
( |
dataname |
( |
parentname |
( |
arm_var |
( |
visit_var |
( |
paramcd |
( |
worst_flag_var |
( |
worst_flag_indicator |
( |
anl_toxgrade_var |
( |
base_toxgrade_var |
( |
id_var |
( |
add_total |
( |
total_label |
( |
drop_arm_levels |
( |
pre_output |
( |
post_output |
( |
na_level |
( |
code_missing_baseline |
( |
basic_table_args |
( |
Value
a teal_module
object.
See Also
The TLG Catalog where additional example apps implementing this module can be found.
Examples
ADSL <- tmc_ex_adsl
ADLB <- tmc_ex_adlb
app <- init(
data = cdisc_data(
ADSL = ADSL,
ADLB = ADLB,
code = "
ADSL <- tmc_ex_adsl
ADLB <- tmc_ex_adlb
"
),
modules = modules(
tm_t_shift_by_grade(
label = "Grade Laboratory Abnormality Table",
dataname = "ADLB",
arm_var = choices_selected(
choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")),
selected = "ARM"
),
paramcd = choices_selected(
choices = value_choices(ADLB, "PARAMCD", "PARAM"),
selected = "ALT"
),
worst_flag_var = choices_selected(
choices = variable_choices(ADLB, subset = c("WGRLOVFL", "WGRLOFL", "WGRHIVFL", "WGRHIFL")),
selected = c("WGRLOVFL")
),
worst_flag_indicator = choices_selected(
value_choices(ADLB, "WGRLOVFL"),
selected = "Y", fixed = TRUE
),
anl_toxgrade_var = choices_selected(
choices = variable_choices(ADLB, subset = c("ATOXGR")),
selected = c("ATOXGR"),
fixed = TRUE
),
base_toxgrade_var = choices_selected(
choices = variable_choices(ADLB, subset = c("BTOXGR")),
selected = c("BTOXGR"),
fixed = TRUE
),
add_total = FALSE
)
),
filter = teal_slices(teal_slice("ADSL", "SAFFL", selected = "Y"))
)
if (interactive()) {
shinyApp(app$ui, app$server)
}