diff --git a/R/tm_a_gee.R b/R/tm_a_gee.R index afed7595a..260549b12 100644 --- a/R/tm_a_gee.R +++ b/R/tm_a_gee.R @@ -390,9 +390,6 @@ ui_gee <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(a$decorators, "table")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -604,14 +601,6 @@ srv_gee <- function(id, table_r = table_r ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index 3c1ec0fc6..02558465b 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -886,9 +886,6 @@ ui_mmrm <- function(id, ...) { ) ) ) - ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ) ), pre_output = a$pre_output, @@ -921,9 +918,6 @@ srv_mmrm <- function(id, moduleServer(id, function(input, output, session) { teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") - # Reactive responsible for sending a disable/enable signal - # to show R code and debug info buttons - disable_r_code <- reactiveVal(FALSE) observeEvent(input[[extract_input("cov_var", dataname)]], { # update covariates as actual variables @@ -1155,8 +1149,7 @@ srv_mmrm <- function(id, }) # Event handler: - # When the "Fit Model" button is clicked, hide initial message, show title, disable model fit and enable - # show R code buttons. + # When the "Fit Model" button is clicked, hide initial message, show title, disable model fit button. shinyjs::onclick("button_start", { state$input <- mmrm_inputs_reactive() shinyjs::hide("null_input_msg") @@ -1164,17 +1157,14 @@ srv_mmrm <- function(id, success <- try(mmrm_fit(), silent = TRUE) if (!inherits(success, "try-error")) { shinyjs::show("mmrm_title") - disable_r_code(FALSE) } else { shinyjs::hide("mmrm_title") - # show R code and debug info buttons will have already been hidden by disable_r_code } }) # all the inputs and data that can be out of sync with the fitted model mmrm_inputs_reactive <- reactive({ shinyjs::disable("button_start") - disable_r_code(TRUE) teal::validate_inputs(iv_r()) encoding_inputs <- lapply( sync_inputs, @@ -1243,9 +1233,7 @@ srv_mmrm <- function(id, # disable the show R code button and show warning message observeEvent(mmrm_inputs_reactive(), { shinyjs::enable("button_start") - disable_r_code(TRUE) if (!state_has_changed()) { - disable_r_code(FALSE) shinyjs::disable("button_start") } }) @@ -1562,19 +1550,9 @@ srv_mmrm <- function(id, show_hide_signal = reactive(!show_plot_rv()) ) - # Show R code once button is pressed. - source_code_r <- reactive( - teal.code::get_code(req(decorated_objs_q[[obj_ix_r()]]())) - ) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - disabled = disable_r_code, - title = label - ) - set_chunk_dims(pws, reactive({ decorated_objs_q[[obj_ix_r()]]() })) + }) } diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index ef96e879b..5a47d231c 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -353,9 +353,6 @@ ui_g_barchart_simple <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -594,15 +591,8 @@ srv_g_barchart_simple <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q_code()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q_code) + ### }) } diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index f5af4ea2d..a6cf5cb47 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -397,9 +397,6 @@ ui_g_ci <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(args$decorators, "plot")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -520,14 +517,6 @@ srv_g_ci <- function(id, # Outputs to render. plot_r <- reactive(decorated_plot_q()[["plot"]]) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_plot_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - pws <- teal.widgets::plot_with_settings_srv( id = "myplot", plot_r = plot_r, diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index 93438ac27..9844c99cc 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -527,9 +527,6 @@ ui_g_forest_rsp <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -826,14 +823,6 @@ srv_g_forest_rsp <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 90568765c..4677bae72 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -528,9 +528,6 @@ ui_g_forest_tte <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -761,14 +758,6 @@ srv_g_forest_tte <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index 6732b4ab5..f911d4107 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -475,9 +475,6 @@ ui_g_ipp <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -653,14 +650,6 @@ srv_g_ipp <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 5769c96e7..4ad1a8c16 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -641,9 +641,6 @@ ui_g_km <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -874,14 +871,6 @@ srv_g_km <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index 730c51cb8..c3f0c0126 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -537,9 +537,6 @@ ui_g_lineplot <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -697,14 +694,6 @@ srv_g_lineplot <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 196febd09..e171d08d2 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -439,9 +439,6 @@ ui_g_adverse_events <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -638,14 +635,6 @@ srv_g_adverse_events <- function(id, c(table_q(), decorated_all_q_plot()) ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 327dc5de8..853b4c093 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -713,9 +713,6 @@ ui_g_patient_timeline <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -960,14 +957,6 @@ srv_g_patient_timeline <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 1efd7df81..1cb2460df 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -542,9 +542,6 @@ ui_g_therapy <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -730,14 +727,6 @@ srv_g_therapy <- function(id, width = plot_width ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q_plot()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q_plot) }) } diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index aa7c2d951..e04748cb1 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -403,9 +403,6 @@ ui_g_vitals <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -581,8 +578,6 @@ srv_g_vitals <- function(id, ) plot_r <- reactive(decorated_all_q()[["plot"]]) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) pws <- teal.widgets::plot_with_settings_srv( id = "vitals_plot", plot_r = plot_r, @@ -590,12 +585,6 @@ srv_g_vitals <- function(id, width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - set_chunk_dims(pws, decorated_all_q) }) } diff --git a/R/tm_t_abnormality.R b/R/tm_t_abnormality.R index 7af3ca295..eb1496d3f 100644 --- a/R/tm_t_abnormality.R +++ b/R/tm_t_abnormality.R @@ -507,9 +507,6 @@ ui_t_abnormality <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -698,14 +695,6 @@ srv_t_abnormality <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_abnormality_by_worst_grade.R b/R/tm_t_abnormality_by_worst_grade.R index 9129622d4..1081de5f0 100644 --- a/R/tm_t_abnormality_by_worst_grade.R +++ b/R/tm_t_abnormality_by_worst_grade.R @@ -505,9 +505,6 @@ ui_t_abnormality_by_worst_grade <- function(id, ...) { # nolint: object_length. ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -715,14 +712,6 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint: object_length. table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_ancova.R b/R/tm_t_ancova.R index fa82c2b34..fbca80f3f 100644 --- a/R/tm_t_ancova.R +++ b/R/tm_t_ancova.R @@ -697,9 +697,6 @@ ui_ancova <- function(id, ...) { ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(a$decorators, "table")) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -1000,14 +997,6 @@ srv_ancova <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_binary_outcome.R b/R/tm_t_binary_outcome.R index 9ef7222cf..7fbff6d4b 100644 --- a/R/tm_t_binary_outcome.R +++ b/R/tm_t_binary_outcome.R @@ -761,9 +761,6 @@ ui_t_binary_outcome <- function(id, ...) { is_single_dataset = is_single_dataset_value ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -1062,14 +1059,6 @@ srv_t_binary_outcome <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_all_q }) } diff --git a/R/tm_t_coxreg.R b/R/tm_t_coxreg.R index c02df4473..82d83d77b 100644 --- a/R/tm_t_coxreg.R +++ b/R/tm_t_coxreg.R @@ -726,9 +726,6 @@ ui_t_coxreg <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(a$decorators, "table")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -1135,14 +1132,6 @@ srv_t_coxreg <- function(id, table_r = table_r ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_events.R b/R/tm_t_events.R index 67f231a59..8e8bccd1f 100644 --- a/R/tm_t_events.R +++ b/R/tm_t_events.R @@ -675,9 +675,6 @@ ui_t_events_byterm <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -860,14 +857,6 @@ srv_t_events_byterm <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_events_by_grade.R b/R/tm_t_events_by_grade.R index 733b8e8b8..7ea06129e 100644 --- a/R/tm_t_events_by_grade.R +++ b/R/tm_t_events_by_grade.R @@ -1018,9 +1018,6 @@ ui_t_events_by_grade <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -1256,13 +1253,6 @@ srv_t_events_by_grade <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) decorated_table_q }) } diff --git a/R/tm_t_events_patyear.R b/R/tm_t_events_patyear.R index ab332c4fa..e3eaeb80e 100644 --- a/R/tm_t_events_patyear.R +++ b/R/tm_t_events_patyear.R @@ -479,9 +479,6 @@ ui_events_patyear <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -680,13 +677,6 @@ srv_events_patyear <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) decorated_table_q }) } diff --git a/R/tm_t_events_summary.R b/R/tm_t_events_summary.R index e05081de8..ab6e70154 100644 --- a/R/tm_t_events_summary.R +++ b/R/tm_t_events_summary.R @@ -849,9 +849,6 @@ ui_t_events_summary <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -1066,13 +1063,6 @@ srv_t_events_summary <- function(id, table_r = table_r ) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) decorated_table_q }) } diff --git a/R/tm_t_exposure.R b/R/tm_t_exposure.R index 0f1712e74..f86361109 100644 --- a/R/tm_t_exposure.R +++ b/R/tm_t_exposure.R @@ -484,9 +484,6 @@ ui_t_exposure <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -681,13 +678,6 @@ srv_t_exposure <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) decorated_table_q }) } diff --git a/R/tm_t_glm_counts.R b/R/tm_t_glm_counts.R index c892c31e3..e922f0e0d 100644 --- a/R/tm_t_glm_counts.R +++ b/R/tm_t_glm_counts.R @@ -187,9 +187,6 @@ ui_t_glm_counts <- function(id, ...) { output <- teal.widgets::white_small_well( teal.widgets::table_with_settings_ui(ns("table")) ) - forms <- tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ) compare_treatments <- tags$div( class = "arm-comp-box", @@ -274,7 +271,6 @@ ui_t_glm_counts <- function(id, ...) { ), table_settings, ), - forms = forms, pre_output = a$pre_output, post_output = a$post_output ) @@ -523,14 +519,6 @@ srv_t_glm_counts <- function(id, teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_logistic.R b/R/tm_t_logistic.R index 380894a50..e016fdf71 100644 --- a/R/tm_t_logistic.R +++ b/R/tm_t_logistic.R @@ -447,9 +447,6 @@ ui_t_logistic <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(a$decorators, "table")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -739,13 +736,6 @@ srv_t_logistic <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) decorated_table_q }) } diff --git a/R/tm_t_mult_events.R b/R/tm_t_mult_events.R index 118c9110b..8f4778d8c 100644 --- a/R/tm_t_mult_events.R +++ b/R/tm_t_mult_events.R @@ -485,9 +485,6 @@ ui_t_mult_events_byterm <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -641,14 +638,6 @@ srv_t_mult_events_byterm <- function(id, teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_pp_basic_info.R b/R/tm_t_pp_basic_info.R index b98676bab..e868393c8 100644 --- a/R/tm_t_pp_basic_info.R +++ b/R/tm_t_pp_basic_info.R @@ -172,9 +172,6 @@ ui_t_basic_info <- function(id, ...) { is_single_dataset = is_single_dataset_value ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -296,13 +293,6 @@ srv_t_basic_info <- function(id, output$basic_info_table <- DT::renderDataTable(table_r()[["html"]]) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) all_q }) } diff --git a/R/tm_t_pp_laboratory.R b/R/tm_t_pp_laboratory.R index deec2bcfb..209c678be 100644 --- a/R/tm_t_pp_laboratory.R +++ b/R/tm_t_pp_laboratory.R @@ -333,9 +333,6 @@ ui_g_laboratory <- function(id, ...) { choices = NULL ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -504,14 +501,6 @@ srv_g_laboratory <- function(id, output$lab_values_table <- DT::renderDataTable(expr = table_r()) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - all_q }) } diff --git a/R/tm_t_pp_medical_history.R b/R/tm_t_pp_medical_history.R index e4b559bd9..200324a89 100644 --- a/R/tm_t_pp_medical_history.R +++ b/R/tm_t_pp_medical_history.R @@ -250,9 +250,6 @@ ui_t_medical_history <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(ui_args$decorators, "table")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -383,14 +380,6 @@ srv_t_medical_history <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_pp_prior_medication.R b/R/tm_t_pp_prior_medication.R index 6c0cb77e2..f624d8200 100644 --- a/R/tm_t_pp_prior_medication.R +++ b/R/tm_t_pp_prior_medication.R @@ -234,9 +234,6 @@ ui_t_prior_medication <- function(id, ...) { is_single_dataset = is_single_dataset_value ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = ui_args$pre_output, post_output = ui_args$post_output ) @@ -369,14 +366,6 @@ srv_t_prior_medication <- function(id, output$prior_medication_table <- DT::renderDataTable(expr = table_r()$html) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(all_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - all_q }) } diff --git a/R/tm_t_shift_by_arm.R b/R/tm_t_shift_by_arm.R index 326604f32..071f06064 100644 --- a/R/tm_t_shift_by_arm.R +++ b/R/tm_t_shift_by_arm.R @@ -434,9 +434,6 @@ ui_shift_by_arm <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -608,14 +605,6 @@ srv_shift_by_arm <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_shift_by_arm_by_worst.R b/R/tm_t_shift_by_arm_by_worst.R index 0d99e8937..e20e2c3c1 100644 --- a/R/tm_t_shift_by_arm_by_worst.R +++ b/R/tm_t_shift_by_arm_by_worst.R @@ -447,9 +447,6 @@ ui_shift_by_arm_by_worst <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -636,14 +633,6 @@ srv_shift_by_arm_by_worst <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_shift_by_grade.R b/R/tm_t_shift_by_grade.R index 252edabde..a86873697 100644 --- a/R/tm_t_shift_by_grade.R +++ b/R/tm_t_shift_by_grade.R @@ -755,9 +755,6 @@ ui_t_shift_by_grade <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -974,13 +971,6 @@ srv_t_shift_by_grade <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) decorated_table_q }) diff --git a/R/tm_t_smq.R b/R/tm_t_smq.R index 4079891b9..5ab7d6908 100644 --- a/R/tm_t_smq.R +++ b/R/tm_t_smq.R @@ -549,9 +549,6 @@ ui_t_smq <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -697,14 +694,6 @@ srv_t_smq <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_summary.R b/R/tm_t_summary.R index 4d8c838a9..b9ccef2ec 100644 --- a/R/tm_t_summary.R +++ b/R/tm_t_summary.R @@ -426,9 +426,6 @@ ui_summary <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(a$decorators, "table")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -611,14 +608,6 @@ srv_summary <- function(id, teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index 39742163b..860b942d3 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -601,9 +601,6 @@ ui_summary_by <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -768,14 +765,6 @@ srv_summary_by <- function(id, table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) } diff --git a/R/tm_t_tte.R b/R/tm_t_tte.R index be0d9858b..fde7c7e48 100644 --- a/R/tm_t_tte.R +++ b/R/tm_t_tte.R @@ -755,9 +755,6 @@ ui_t_tte <- function(id, ...) { ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(a$decorators, "table")), ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), button_label = "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -993,14 +990,6 @@ srv_t_tte <- function(id, teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) - # Render R code - source_code_r <- reactive(teal.code::get_code(req(decorated_table_q()))) - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = label - ) - decorated_table_q }) }