-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds decorators to
tm_t_pp_basic_info
(#1282)
Part of insightsengineering/teal#1371 <details> <summary>Working example</summary> ```r # Load packages pkgload::load_all("../teal.modules.clinical", export_all = FALSE) # Example below insert_rlisting_footer_decorator <- function(default_caption = "I am a good new footer", .var_to_replace = "table") { teal_transform_module( label = "New row", ui = function(id) shiny::textInput(shiny::NS(id, "new_footer"), "New footer", value = default_caption), server = make_teal_transform_server( substitute({ rlistings::main_footer(.var_to_replace) <- new_footer }, env = list(.var_to_replace = as.name(.var_to_replace))) ) ) } data <- teal_data() data <- within(data, { ADSL <- tmc_ex_adsl }) join_keys(data) <- default_cdisc_join_keys[names(data)] ADSL <- data[["ADSL"]] 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")), decorators = list( table = insert_rlisting_footer_decorator(.var_to_replace = "table") ) ) ) ) |> shiny::runApp() ``` </details>
- Loading branch information
1 parent
83d9fb0
commit 95f11f3
Showing
2 changed files
with
55 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.