diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 1cf0d40d4..5f712eb77 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -341,9 +341,6 @@ ui_a_pca <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -1080,8 +1077,6 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco graph_align = "center" ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q) - # tables ---- output$tbl_importance <- renderTable( expr = { @@ -1135,14 +1130,6 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ) }) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "R Code for PCA" - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_q) }) } diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 3ed9f29d6..d8900487e 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -374,9 +374,6 @@ ui_a_regression <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -1021,22 +1018,12 @@ srv_a_regression <- function(id, width = plot_width ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q) - output$text <- renderText({ req(iv_r()$is_valid()) req(iv_out$is_valid()) paste(utils::capture.output(summary(fitted()))[-1], collapse = "\n") }) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "R code for the regression plot", - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_q) }) } diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 5016472ba..db51dde49 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -289,9 +289,6 @@ ui_tm_g_association <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -545,18 +542,8 @@ srv_tm_g_association <- function(id, width = plot_width ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_grob_q) - output$title <- renderText(output_q()[["title"]]) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Association Plot" - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_grob_q) }) } diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index a2099ae36..60e708dbc 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -466,9 +466,6 @@ ui_g_bivariate <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -741,18 +738,7 @@ srv_g_bivariate <- function(id, width = plot_width ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q_facets) - - # Render R code. - - source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Bivariate Plot" - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_q_facets) }) } diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index b75aee801..fb7feb1a2 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -377,9 +377,6 @@ ui_distribution <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -1402,14 +1399,6 @@ srv_distribution <- function(id, output$t_stats <- DT::renderDataTable(tests_r()) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "R Code for distribution" - ) decorated_output_q }) } diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 7f22bacb5..bc618f4f6 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -320,9 +320,6 @@ ui_g_response <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -594,16 +591,6 @@ srv_g_response <- function(id, width = plot_width ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_plot_q) - - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Show R Code for Response" - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_plot_q) }) } diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 1c0a38ab3..6c8359289 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -495,9 +495,6 @@ ui_g_scatterplot <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -1037,8 +1034,6 @@ srv_g_scatterplot <- function(id, brushing = TRUE ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_plot_q) - output$data_table <- DT::renderDataTable({ plot_brush <- pws$brush() @@ -1067,14 +1062,6 @@ srv_g_scatterplot <- function(id, } }) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "R Code for scatterplot" - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_plot_q) }) } diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 25187f35f..fb15a0ed8 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -288,9 +288,6 @@ ui_g_scatterplotmatrix <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -479,8 +476,6 @@ srv_g_scatterplotmatrix <- function(id, width = plot_width ) - decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q) - # show a message if conversion to factors took place output$message <- renderText({ req(iv_r()$is_valid()) @@ -503,15 +498,7 @@ srv_g_scatterplotmatrix <- function(id, } }) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Show R Code for Scatterplotmatrix" - ) - decorated_output_dims_q + set_chunk_dims(pws, decorated_output_q) }) } diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 0778b4e0e..90cac56fb 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -189,7 +189,6 @@ ui_page_missing_data <- function(id, pre_output = NULL, post_output = NULL) { encoding = tags$div( uiOutput(ns("dataset_encodings")) ), - uiOutput(ns("dataset_reporter")), pre_output = pre_output, post_output = post_output ) @@ -248,19 +247,6 @@ srv_page_missing_data <- function(id, data, datanames, parent_dataname, ) }) - output$dataset_reporter <- renderUI({ - lapply(datanames, function(x) { - dataname_ns <- NS(ns(x)) - - conditionalPanel( - is_tab_active_js(ns("dataname_tab"), x), - tagList( - teal.widgets::verbatim_popup_ui(dataname_ns("rcode"), "Show R code") - ) - ) - }) - }) - result <- sapply( datanames, function(x) { @@ -727,7 +713,7 @@ srv_missing_data <- function(id, # Prepare qenvs for output objects summary_plot_q <- reactive({ - req(input$summary_type == "Summary") # needed to trigger show r code update on tab change + req(input$summary_type == "Summary") # needed to trigger update on tab change teal::validate_has_data(data_r(), 1) qenv <- common_code_q() @@ -1071,7 +1057,7 @@ srv_missing_data <- function(id, summary_table_q <- reactive({ req( - input$summary_type == "By Variable Levels", # needed to trigger show r code update on tab change + input$summary_type == "By Variable Levels", # needed to trigger update on tab change common_code_q() ) teal::validate_has_data(data_r(), 1) @@ -1158,7 +1144,7 @@ srv_missing_data <- function(id, }) by_subject_plot_q <- reactive({ - # needed to trigger show r code update on tab change + # needed to trigger update on tab change req(input$summary_type == "Grouped by Subject", common_code_q()) teal::validate_has_data(data_r(), 1) @@ -1391,14 +1377,6 @@ srv_missing_data <- function(id, } }) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_final_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Show R Code for Missing Data" - ) decorated_final_q }) } diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 942a4ad96..f8a552322 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -374,9 +374,6 @@ ui_outliers <- function(id, ...) { ) ) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = args$pre_output, post_output = args$post_output ) @@ -1336,14 +1333,6 @@ srv_outliers <- function(id, data, outlier_var, ) }) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_final_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Show R Code for Outlier" - ) decorated_final_q }) } diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 4f7d6868a..0fa64c90a 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -264,9 +264,6 @@ ui_t_crosstable <- function(id, x, y, show_percentage, show_total, remove_zero_c ), ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(args$decorators, "table")) ), - forms = tagList( - teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") - ), pre_output = pre_output, post_output = post_output ) @@ -482,14 +479,6 @@ srv_t_crosstable <- function(id, data, label, x, y, remove_zero_columns, basic_t table_r = table_r ) - # Render R code. - source_code_r <- reactive(teal.code::get_code(req(decorated_output_q()))) - - teal.widgets::verbatim_popup_srv( - id = "rcode", - verbatim_content = source_code_r, - title = "Show R Code for Cross-Table" - ) decorated_output_q }) }