View source: R/tm_t_shift_by_arm_by_worst.R
tm_t_shift_by_arm_by_worst | R Documentation |
This module produces a summary table of worst analysis indicator variable level per subject by arm.
tm_t_shift_by_arm_by_worst(
label,
dataname,
parentname = ifelse(inherits(arm_var, "data_extract_spec"),
teal.transform::datanames_input(arm_var), "ADSL"),
arm_var,
paramcd,
aval_var,
base_var = lifecycle::deprecated(),
baseline_var,
worst_flag_var,
worst_flag,
treatment_flag_var = teal.transform::choices_selected(choices =
teal.transform::variable_choices(dataname, subset = "ONTRTFL"), selected = "ONTRTFL"),
treatment_flag = teal.transform::choices_selected("Y"),
useNA = c("ifany", "no"),
na_level = default_na_str(),
add_total = FALSE,
total_label = default_total_label(),
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args(),
transformators = list(),
decorators = list()
)
a teal_module
object.
This module generates the following objects, which can be modified in place using decorators:
table
(TableTree
- output of rtables::build_table()
)
A Decorator is applied to the specific output using a named list of teal_transform_module
objects.
The name of this list corresponds to the name of the output to which the decorator is applied.
See code snippet below:
tm_t_shift_by_arm_by_worst( ..., # arguments for module decorators = list( table = teal_transform_module(...) # applied only to `table` output ) )
For additional details and examples of decorators, refer to the vignette
vignette("decorate-module-output", package = "teal.modules.clinical")
.
To learn more please refer to the vignette
vignette("transform-module-output", package = "teal")
or the teal::teal_transform_module()
documentation.
data <- teal_data()
data <- within(data, {
ADSL <- tmc_ex_adsl
ADEG <- tmc_ex_adeg
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
ADSL <- data[["ADSL"]]
ADEG <- data[["ADEG"]]
app <- init(
data = data,
modules = modules(
tm_t_shift_by_arm_by_worst(
label = "Shift by Arm Table",
dataname = "ADEG",
arm_var = choices_selected(
variable_choices(ADSL, subset = c("ARM", "ARMCD")),
selected = "ARM"
),
paramcd = choices_selected(
value_choices(ADEG, "PARAMCD"),
selected = "ECGINTP"
),
worst_flag_var = choices_selected(
variable_choices(ADEG, c("WORS02FL", "WORS01FL")),
selected = "WORS02FL"
),
worst_flag = choices_selected(
value_choices(ADEG, "WORS02FL"),
selected = "Y",
fixed = TRUE
),
aval_var = choices_selected(
variable_choices(ADEG, c("AVALC", "ANRIND")),
selected = "AVALC"
),
baseline_var = choices_selected(
variable_choices(ADEG, c("BASEC", "BNRIND")),
selected = "BASEC"
),
useNA = "ifany"
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.