This module produces a patient profile basic info report using ADaM datasets.
Usage
tm_t_pp_basic_info(
label,
dataname = "ADSL",
patient_col = "USUBJID",
vars = NULL,
pre_output = NULL,
post_output = NULL,
decorators = NULL
)
Arguments
- label
(
character
)
menu item label of the module in the teal app.- dataname
(
character
)
analysis data used in teal module.- patient_col
(
character
)
name of patient ID variable.- vars
(
teal.transform::choices_selected()
)
object with all available choices and preselected option for variables fromdataname
to show in the table.- 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.- decorators
-
" (
list
ofteal_transform_module
, namedlist
ofteal_transform_module
or"NULL
) optional, if notNULL
, decorator for tables or plots included in the module. When a named list ofteal_transform_module
, the decorators are applied to the respective output objects.Otherwise, the decorators are applied to all objects, which is equivalent as using the name
default
.See section "Decorating Module" below for more details.
Decorating Module
This module generates the following objects, which can be modified in place using decorators:
table
(listing_df
- output ofrlistings::as_listing
)
For additional details and examples of decorators, refer to the vignette
vignette("decorate-modules-output", package = "teal")
or the teal_transform_module()
documentation.
Examples
data <- teal_data()
data <- within(data, {
ADSL <- tmc_ex_adsl
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
ADSL <- data[["ADSL"]]
app <- init(
data = data,
modules = modules(
tm_t_pp_basic_info(
label = "Basic Info",
dataname = "ADSL",
patient_col = "USUBJID",
vars = choices_selected(
choices = variable_choices(ADSL),
selected = c("ARM", "AGE", "SEX", "COUNTRY", "RACE", "EOSSTT")
)
)
)
)
#> Initializing tm_t_pp_basic_info
#> Initializing reporter_previewer_module
if (interactive()) {
shinyApp(app$ui, app$server)
}