diff --git a/R/tm_g_ae_oview.R b/R/tm_g_ae_oview.R index cde73e55..5adab9ce 100644 --- a/R/tm_g_ae_oview.R +++ b/R/tm_g_ae_oview.R @@ -186,9 +186,6 @@ ui_g_ae_oview <- function(id, ...) { titles = "AE Overview", footnotes = "" ) - ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ) ) } @@ -337,12 +334,6 @@ srv_g_ae_oview <- function(id, ) plot_r <- reactive(output_q()[["plot"]]) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = reactive(teal.code::get_code(output_q())), - title = paste("R code for", label) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_ae_sub.R b/R/tm_g_ae_sub.R index 2071f1dd..5658db71 100644 --- a/R/tm_g_ae_sub.R +++ b/R/tm_g_ae_sub.R @@ -163,9 +163,6 @@ ui_g_ae_sub <- function(id, ...) { footnotes = "" ) ) - ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ) ) } @@ -379,12 +376,6 @@ srv_g_ae_sub <- function(id, ) plot_r <- reactive(output_q()[["plot"]]) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = reactive(teal.code::get_code(output_q())), - title = paste("R code for", label), - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_butterfly.R b/R/tm_g_butterfly.R index 358e8cd0..5b22f2d5 100644 --- a/R/tm_g_butterfly.R +++ b/R/tm_g_butterfly.R @@ -253,9 +253,6 @@ ui_g_butterfly <- function(id, ...) { value = a$legend_on ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -471,16 +468,22 @@ srv_g_butterfly <- function(id, data, dataname, label, plot_height, plot_width) teal.reporter::teal_card(q1) <- c(teal.reporter::teal_card(q1), "### Selected Options") } if (!is.null(input$filter_var)) { - teal.reporter::teal_card(q1) <- - c(teal.reporter::teal_card(q1), paste0("Preset Data Filters: ", paste(input$filter_var, collapse = ", "), ".")) + teal.reporter::teal_card(q1) <- c( + teal.reporter::teal_card(q1), + sprintf("Preset Data Filters: %s.", paste(input$filter_var, collapse = ", ")) + ) } if (!is.null(input$facet_var)) { - teal.reporter::teal_card(q1) <- - c(teal.reporter::teal_card(q1), paste0("Faceted by: ", paste(input$facet_var, collapse = ", "), ".")) + teal.reporter::teal_card(q1) <- c( + teal.reporter::teal_card(q1), + sprintf("Faceted by: %s.", paste(input$facet_var, collapse = ", ")) + ) } if (!is.null(input$sort_by_var)) { - teal.reporter::teal_card(q1) <- - c(teal.reporter::teal_card(q1), paste0("Sorted by: ", paste(input$sort_by_var, collapse = ", "), ".")) + teal.reporter::teal_card(q1) <- c( + teal.reporter::teal_card(q1), + sprintf("Sorted by: %s.", paste(input$sort_by_var, collapse = ", ")) + ) } if (!is.null(right_val) && !is.null(left_val)) { @@ -528,11 +531,6 @@ srv_g_butterfly <- function(id, data, dataname, label, plot_height, plot_width) width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_decorate.R b/R/tm_g_decorate.R index ac3d6152..b6c26dda 100644 --- a/R/tm_g_decorate.R +++ b/R/tm_g_decorate.R @@ -75,12 +75,7 @@ srv_g_decorate <- function(id, width = plot_width ) - return( - list( - font_size = reactive(input$fontsize), - pws = pws - ) - ) + list(font_size = reactive(input$fontsize), pws = pws) }) } diff --git a/R/tm_g_events_term_id.R b/R/tm_g_events_term_id.R index 9cbb36c2..e1dff5fb 100644 --- a/R/tm_g_events_term_id.R +++ b/R/tm_g_events_term_id.R @@ -190,9 +190,6 @@ ui_g_events_term_id <- function(id, ...) { titles = "Common AE Table", footnotes = "" ) - ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ) ) } @@ -246,7 +243,6 @@ srv_g_events_term_id <- function(id, ) }) - observeEvent(input$sort, { sort <- if (is.null(input$sort)) " " else input$sort @@ -365,12 +361,6 @@ srv_g_events_term_id <- function(id, }) plot_r <- reactive(output_q()[["plot"]]) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_heat_bygrade.R b/R/tm_g_heat_bygrade.R index 8b3347c3..f06bc30c 100644 --- a/R/tm_g_heat_bygrade.R +++ b/R/tm_g_heat_bygrade.R @@ -264,9 +264,6 @@ ui_g_heatmap_bygrade <- function(id, ...) { titles = "Heatmap by Grade", footnotes = "" ) - ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ) ) ) @@ -459,12 +456,6 @@ srv_g_heatmap_bygrade <- function(id, ) plot_r <- reactive(output_q()[["plot"]]) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_patient_profile.R b/R/tm_g_patient_profile.R index 12c477ad..9f2f6809 100644 --- a/R/tm_g_patient_profile.R +++ b/R/tm_g_patient_profile.R @@ -327,9 +327,6 @@ ui_g_patient_profile <- function(id, ...) { value = a$x_limit ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -913,11 +910,6 @@ srv_g_patient_profile <- function(id, width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_spiderplot.R b/R/tm_g_spiderplot.R index c1aa6b40..2944d061 100644 --- a/R/tm_g_spiderplot.R +++ b/R/tm_g_spiderplot.R @@ -235,9 +235,6 @@ ui_g_spider <- function(id, ...) { value = a$href_line ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -396,12 +393,16 @@ srv_g_spider <- function(id, data, dataname, paramcd, label, plot_height, plot_w c(teal.reporter::teal_card(q1), paste0("Parameter - (from ", dataname, "): ", input$paramcd, ".")) } if (!is.null(input$xfacet_var)) { - teal.reporter::teal_card(q1) <- - c(teal.reporter::teal_card(q1), paste0("Faceted horizontally by: ", paste(input$xfacet_var, collapse = ", "), ".")) + teal.reporter::teal_card(q1) <- c( + teal.reporter::teal_card(q1), + sprintf("Faceted horizontally by: %s.", paste(input$xfacet_var, collapse = ", ")) + ) } if (!is.null(input$yfacet_var)) { - teal.reporter::teal_card(q1) <- - c(teal.reporter::teal_card(q1), paste0("Faceted vertically by: ", paste(input$yfacet_var, collapse = ", "), ".")) + teal.reporter::teal_card(q1) <- c( + teal.reporter::teal_card(q1), + sprintf("Faceted vertically by: %s.", paste(input$yfacet_var, collapse = ", ")) + ) } q1 <- teal.code::eval_code( @@ -460,11 +461,6 @@ srv_g_spider <- function(id, data, dataname, paramcd, label, plot_height, plot_w width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_swimlane.R b/R/tm_g_swimlane.R index 10580f1c..bb138665 100644 --- a/R/tm_g_swimlane.R +++ b/R/tm_g_swimlane.R @@ -248,9 +248,6 @@ ui_g_swimlane <- function(id, ...) { value = paste(a$vref_line, collapse = ", ") ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -525,11 +522,6 @@ srv_g_swimlane <- function(id, width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) } diff --git a/R/tm_g_waterfall.R b/R/tm_g_waterfall.R index e07af4a0..cd14ac2a 100644 --- a/R/tm_g_waterfall.R +++ b/R/tm_g_waterfall.R @@ -258,9 +258,6 @@ ui_g_waterfall <- function(id, ...) { value = a$gap_point_val ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = a$pre_output, post_output = a$post_output ) @@ -590,12 +587,6 @@ srv_g_waterfall <- function(id, width = plot_width ) - # Show R Code - teal.widgets::verbatim_popup_srv( - id = "rcode", - title = paste("R code for", label), - verbatim_content = reactive(teal.code::get_code(output_q())) - ) set_chunk_dims(pws, output_q) }) }