From 78d35c97a9498947181b781f73ba6db84b38eb35 Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Tue, 20 May 2025 11:58:46 +0200 Subject: [PATCH 01/38] wip --- R/tm_a_pca.R | 2 ++ R/tm_a_regression.R | 11 ++++++++--- R/tm_g_association.R | 2 ++ R/tm_g_bivariate.R | 2 ++ R/tm_g_distribution.R | 7 +++++++ R/tm_g_response.R | 2 ++ R/tm_g_scatterplot.R | 2 ++ R/tm_g_scatterplotmatrix.R | 1 + 8 files changed, 26 insertions(+), 3 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 8e4111cb5..c61e9572b 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -1158,5 +1158,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + + decorated_output_q }) } diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 5c0169e3b..2216c7381 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -982,7 +982,7 @@ srv_a_regression <- function(id, output_q <- reactive({ teal::validate_inputs(iv_r()) - switch(input$plot_type, + obj <- switch(input$plot_type, "Response vs Regressor" = output_plot_0(), "Residuals vs Fitted" = output_plot_1(), "Normal Q-Q" = output_plot_2(), @@ -991,6 +991,9 @@ srv_a_regression <- function(id, "Residuals vs Leverage" = output_plot_5(), "Cook's dist vs Leverage" = output_plot_6() ) + + teal.data::report(obj) <- c(teal.data::report(obj), "# Plot", obj[["plot"]]) + obj }) decorated_output_q <- srv_decorate_teal_data( @@ -1001,11 +1004,11 @@ srv_a_regression <- function(id, ) fitted <- reactive({ - req(output_q()) + req(decorated_output_q()) decorated_output_q()[["fit"]] }) plot_r <- reactive({ - req(output_q()) + req(decorated_output_q()) decorated_output_q()[["plot"]] }) @@ -1055,5 +1058,7 @@ srv_a_regression <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + + decorated_output_q }) } diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 388cee957..f9a0f1868 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -576,6 +576,8 @@ srv_tm_g_association <- function(id, } teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } + + decorated_output_grob_q ### }) } diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index ae66715d6..6d113356e 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -774,6 +774,8 @@ srv_g_bivariate <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + + decorated_output_q_facets }) } diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 46d77137b..4c36ec07c 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -1417,5 +1417,12 @@ srv_distribution <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + reactive( + if (input$tabs == "Histogram") { + decorated_output_dist_q() + } else if (input$tabs == "QQplot") { + decorated_output_qq_q() + } + ) }) } diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 4aef34801..49683a52c 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -622,5 +622,7 @@ srv_g_response <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + + decorated_output_plot_q }) } diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 7fc1b3a37..3f84cc2a8 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -1095,5 +1095,7 @@ srv_g_scatterplot <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + + decorated_output_plot_q }) } diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 9ea6b6301..e40b60d26 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -529,6 +529,7 @@ srv_g_scatterplotmatrix <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + decorated_output_q }) } From 9c498c176fc14ae58bca39f99db4c5eaff962ddb Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Tue, 27 May 2025 14:26:20 +0200 Subject: [PATCH 02/38] WIP implementation of teal_reportable --- R/tm_a_pca.R | 5 ++--- R/tm_a_regression.R | 12 ++++++------ R/tm_g_association.R | 4 ++-- R/tm_g_bivariate.R | 5 ++--- R/tm_g_distribution.R | 8 ++++---- R/tm_g_response.R | 2 +- R/tm_g_scatterplot.R | 2 +- R/tm_g_scatterplotmatrix.R | 2 +- R/tm_missing_data.R | 12 ++++++------ R/tm_outliers.R | 5 ++--- R/tm_t_crosstable.R | 2 +- R/utils.R | 36 +++++++++++++++--------------------- 12 files changed, 43 insertions(+), 52 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index c61e9572b..3929f475c 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -1038,9 +1038,8 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl data = q, decorators = select_decorators(decorators, obj_name), expr = reactive({ - substitute(print(.plot), env = list(.plot = as.name(obj_name))) - }), - expr_is_reactive = TRUE + substitute(.plot, env = list(.plot = as.name(obj_name))) + }) ) }, names(output_q), diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 2216c7381..cec73821f 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -462,9 +462,11 @@ srv_a_regression <- function(id, ) }) - qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes - ) + qenv <- reactive({ + obj <- data() + teal.reporter::report(obj) <- c(teal.reporter::report(obj), "# Module's computation") + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes + }) anl_merged_q <- reactive({ req(anl_merged_input()) @@ -991,8 +993,6 @@ srv_a_regression <- function(id, "Residuals vs Leverage" = output_plot_5(), "Cook's dist vs Leverage" = output_plot_6() ) - - teal.data::report(obj) <- c(teal.data::report(obj), "# Plot", obj[["plot"]]) obj }) @@ -1000,7 +1000,7 @@ srv_a_regression <- function(id, "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = print(plot) + expr = quote(plot) ) fitted <- reactive({ diff --git a/R/tm_g_association.R b/R/tm_g_association.R index f9a0f1868..5f379bc73 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -525,10 +525,10 @@ srv_tm_g_association <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = { + expr = quote({ grid::grid.newpage() grid::grid.draw(plot) - } + }) ) plot_r <- reactive({ diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 6d113356e..ec4559fb8 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -711,7 +711,7 @@ srv_g_bivariate <- function(id, without_facet <- (is.null(nulled_row_facet_name) && is.null(nulled_col_facet_name)) || !facetting print_call <- if (without_facet) { - quote(print(plot)) + quote(plot) } else { substitute( expr = { @@ -730,8 +730,7 @@ srv_g_bivariate <- function(id, ) } print_call - }), - expr_is_reactive = TRUE + }) ) plot_r <- reactive(req(decorated_output_q_facets())[["plot"]]) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 4c36ec07c..5ae32a2fd 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -1297,28 +1297,28 @@ srv_distribution <- function(id, "d_density", data = output_dist_q, decorators = select_decorators(decorators, "histogram_plot"), - expr = print(histogram_plot) + expr = quote(histogram_plot) ) decorated_output_qq_q <- srv_decorate_teal_data( "d_qq", data = output_qq_q, decorators = select_decorators(decorators, "qq_plot"), - expr = print(qq_plot) + expr = quote(qq_plot) ) decorated_output_summary_q <- srv_decorate_teal_data( "d_summary", data = output_summary_q, decorators = select_decorators(decorators, "summary_table"), - expr = summary_table + expr = quote(summary_table) ) decorated_output_test_q <- srv_decorate_teal_data( "d_test", data = output_test_q, decorators = select_decorators(decorators, "test_table"), - expr = test_table + expr = quote(test_table) ) decorated_output_q <- reactive({ diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 49683a52c..3e24848a7 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -579,7 +579,7 @@ srv_g_response <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = print(plot) + expr = quote(plot) ) plot_r <- reactive(req(decorated_output_plot_q())[["plot"]]) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 0436a2968..beedc7a9f 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -1023,7 +1023,7 @@ srv_g_scatterplot <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = print(plot) + expr = quote(plot) ) plot_r <- reactive(req(decorated_output_plot_q())[["plot"]]) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index e40b60d26..e41b57139 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -464,7 +464,7 @@ srv_g_scatterplotmatrix <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = print(plot) + expr = quote(plot) ) plot_r <- reactive(req(decorated_output_q())[["plot"]]) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 0e1cd859e..867ee2890 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -1269,34 +1269,34 @@ srv_missing_data <- function(id, id = "dec_summary_plot", data = summary_plot_q, decorators = select_decorators(decorators, "summary_plot"), - expr = { + expr = quote({ grid::grid.newpage() grid::grid.draw(summary_plot) - } + }) ) decorated_combination_plot_q <- srv_decorate_teal_data( id = "dec_combination_plot", data = combination_plot_q, decorators = select_decorators(decorators, "combination_plot"), - expr = { + expr = quote({ grid::grid.newpage() grid::grid.draw(combination_plot) - } + }) ) decorated_summary_table_q <- srv_decorate_teal_data( id = "dec_summary_table", data = summary_table_q, decorators = select_decorators(decorators, "table"), - expr = table + expr = quote(table) ) decorated_by_subject_plot_q <- srv_decorate_teal_data( id = "dec_by_subject_plot", data = by_subject_plot_q, decorators = select_decorators(decorators, "by_subject_plot"), - expr = print(by_subject_plot) + expr = quote(by_subject_plot) ) # Plots & tables reactives diff --git a/R/tm_outliers.R b/R/tm_outliers.R index e15ba7635..ae60cfc8b 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -1037,8 +1037,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, }, env = list(table_columns = input$table_ui_columns, .plot = as.name(obj_name)) ) - }), - expr_is_reactive = TRUE + }) ) }, stats::setNames(nm = c("box_plot", "density_plot", "cumulative_plot")), @@ -1051,7 +1050,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, "d_table", data = decorated_final_q_no_table, decorators = select_decorators(decorators, "table"), - expr = table + expr = quote(table) ) output$summary_table <- DT::renderDataTable( diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 15fd5c8a8..8a5bae411 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -427,7 +427,7 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, id = "decorator", data = output_q, decorators = select_decorators(decorators, "table"), - expr = table + expr = quote(table) ) output$title <- renderText(req(decorated_output_q())[["title"]]) diff --git a/R/utils.R b/R/utils.R index 5eb3609fd..8af66494c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -289,8 +289,6 @@ assert_single_selection <- function(x, #' @param expr (`expression` or `reactive`) to evaluate on the output of the decoration. #' When an expression it must be inline code. See [within()] #' Default is `NULL` which won't evaluate any appending code. -#' @param expr_is_reactive (`logical(1)`) whether `expr` is a reactive expression -#' that skips defusing the argument. #' @details #' `srv_decorate_teal_data` is a wrapper around `srv_transform_teal_data` that #' allows to decorate the data with additional expressions. @@ -298,33 +296,29 @@ assert_single_selection <- function(x, #' first. #' #' @keywords internal -srv_decorate_teal_data <- function(id, data, decorators, expr, expr_is_reactive = FALSE) { +srv_decorate_teal_data <- function(id, data, decorators, expr) { checkmate::assert_class(data, classes = "reactive") checkmate::assert_list(decorators, "teal_transform_module") - checkmate::assert_flag(expr_is_reactive) - - missing_expr <- missing(expr) - if (!missing_expr && !expr_is_reactive) { - expr <- dplyr::enexpr(expr) # Using dplyr re-export to avoid adding rlang to Imports - } + expr_is_missing <- missing(expr) moduleServer(id, function(input, output, session) { decorated_output <- srv_transform_teal_data("inner", data = data, transformators = decorators) + expr_r <- reactive({ + if (is.reactive(expr)) { + expr() + } else { + expr + } + }) + reactive({ - data_out <- try(data(), silent = TRUE) - if (inherits(data_out, "qenv.error")) { - data() + req(data(), decorated_output()) + if (expr_is_missing) { + decorated_output() } else { - # ensure original errors are displayed and `eval_code` is never executed with NULL - req(data(), decorated_output()) - if (missing_expr) { - decorated_output() - } else if (expr_is_reactive) { - teal.code::eval_code(decorated_output(), expr()) - } else { - teal.code::eval_code(decorated_output(), expr) - } + req(expr_r()) + teal.code::eval_code(decorated_output(), expr_r(), cache = TRUE) } }) }) From 334509b3423b6ecc58209c7a09dee93745b033fa Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Tue, 3 Jun 2025 06:57:10 +0200 Subject: [PATCH 03/38] no need to grid.draw grobs --- R/tm_g_association.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 5f379bc73..6192c724d 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -525,10 +525,7 @@ srv_tm_g_association <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote({ - grid::grid.newpage() - grid::grid.draw(plot) - }) + expr = quote(plot) ) plot_r <- reactive({ From 61ab5541d487a0fb54b01e22bc969a9cc56d2fe3 Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Tue, 3 Jun 2025 10:32:34 +0200 Subject: [PATCH 04/38] replace grob with grid output --- R/tm_g_association.R | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 6192c724d..06c248a73 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -347,7 +347,7 @@ srv_tm_g_association <- function(id, ) qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("tern");library("ggmosaic")') # nolint quotes + teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes ) anl_merged_q <- reactive({ req(anl_merged_input()) @@ -506,9 +506,7 @@ srv_tm_g_association <- function(id, substitute( expr = { plots <- plot_calls - plot_top <- plots[[1]] - plot_bottom <- plots[[2]] - plot <- tern::stack_grobs(grobs = lapply(list(plot_top, plot_bottom), ggplot2::ggplotGrob)) + plot <- grid.arrange(plots[[1]], plots[[2]], ncol = 1) }, env = list( plot_calls = do.call( From 8162a8c6dd0b367c44aeb14d746b29c0224787b8 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:19:41 +0000 Subject: [PATCH 05/38] [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update --- man/srv_decorate_teal_data.Rd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/man/srv_decorate_teal_data.Rd b/man/srv_decorate_teal_data.Rd index 91977f9b9..43bd3b4d4 100644 --- a/man/srv_decorate_teal_data.Rd +++ b/man/srv_decorate_teal_data.Rd @@ -5,7 +5,7 @@ \alias{ui_decorate_teal_data} \title{Wrappers around \code{srv_transform_teal_data} that allows to decorate the data} \usage{ -srv_decorate_teal_data(id, data, decorators, expr, expr_is_reactive = FALSE) +srv_decorate_teal_data(id, data, decorators, expr) ui_decorate_teal_data(id, decorators, ...) } @@ -17,9 +17,6 @@ ui_decorate_teal_data(id, decorators, ...) \item{expr}{(\code{expression} or \code{reactive}) to evaluate on the output of the decoration. When an expression it must be inline code. See \code{\link[=within]{within()}} Default is \code{NULL} which won't evaluate any appending code.} - -\item{expr_is_reactive}{(\code{logical(1)}) whether \code{expr} is a reactive expression -that skips defusing the argument.} } \description{ Wrappers around \code{srv_transform_teal_data} that allows to decorate the data From e734d5c75ee75251f546be1a4e48705adac3f405 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Fri, 6 Jun 2025 14:26:42 +0200 Subject: [PATCH 06/38] Naming (#885) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Companion to https://github.com/insightsengineering/teal.reporter/pull/334 Consequence of changing naming convention for `teal_report` object. --------- Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> --- R/tm_a_regression.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index cec73821f..9783df2e1 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -464,7 +464,7 @@ srv_a_regression <- function(id, qenv <- reactive({ obj <- data() - teal.reporter::report(obj) <- c(teal.reporter::report(obj), "# Module's computation") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's computation") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) From f0600dc6fec268e0e295435b806ec43e52d6f4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Fri, 6 Jun 2025 18:11:43 +0100 Subject: [PATCH 07/38] feat: improvements to tm_missing --- R/tm_g_scatterplotmatrix.R | 4 +++- R/tm_missing_data.R | 23 ++++++++++++++++++++--- R/utils.R | 2 +- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index e41b57139..fa8467f02 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -333,7 +333,9 @@ srv_g_scatterplotmatrix <- function(id, anl_merged_q <- reactive({ req(anl_merged_input()) - qenv <- teal.code::eval_code(data(), 'library("dplyr");library("lattice")') # nolint quotes + obj <- data() + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's computation") + qenv <- teal.code::eval_code(obj, 'library("dplyr");library("lattice")') # nolint: quotes. teal.code::eval_code(qenv, as.expression(anl_merged_input()$expr)) }) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 867ee2890..f132b3ec5 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -265,7 +265,7 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, dataname }) }) - lapply( + result <- sapply( datanames, function(x) { srv_missing_data( @@ -280,8 +280,18 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, dataname ggplot2_args = ggplot2_args, decorators = decorators ) - } + }, + USE.NAMES = TRUE, + simplify = FALSE ) + + reactive({ + if (is.null(input$dataname_tab)) { + teal.data::teal_data() + } else { + result[[input$dataname_tab]]() + } + }) }) } @@ -521,7 +531,10 @@ srv_missing_data <- function(id, group_var <- input$group_by_var anl <- data_r() - qenv <- teal.code::eval_code(data(), { + obj <- data() + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's computation") + + qenv <- teal.code::eval_code(obj, { 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes }) @@ -1272,6 +1285,7 @@ srv_missing_data <- function(id, expr = quote({ grid::grid.newpage() grid::grid.draw(summary_plot) + summary_plot }) ) @@ -1282,6 +1296,7 @@ srv_missing_data <- function(id, expr = quote({ grid::grid.newpage() grid::grid.draw(combination_plot) + combination_plot }) ) @@ -1417,5 +1432,7 @@ srv_missing_data <- function(id, teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) } ### + + decorated_final_q }) } diff --git a/R/utils.R b/R/utils.R index 8af66494c..58b2c545c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -318,7 +318,7 @@ srv_decorate_teal_data <- function(id, data, decorators, expr) { decorated_output() } else { req(expr_r()) - teal.code::eval_code(decorated_output(), expr_r(), cache = TRUE) + teal.code::eval_code(decorated_output(), expr_r(), keep_output = TRUE) } }) }) From ad5299c184a20da26cac1e62119758b9090025b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:42:32 +0200 Subject: [PATCH 08/38] feat: support argument rename and clean function body (#888) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request - Changes from `teal_reportable` branch at `{ŧeal.report}` - Remove old logic that was defusing the argument --- R/utils.R | 22 +++++++--------------- man/srv_decorate_teal_data.Rd | 12 +++++++++--- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/R/utils.R b/R/utils.R index 58b2c545c..29a1033fd 100644 --- a/R/utils.R +++ b/R/utils.R @@ -286,8 +286,9 @@ assert_single_selection <- function(x, #' Wrappers around `srv_transform_teal_data` that allows to decorate the data #' @inheritParams teal::srv_transform_teal_data -#' @param expr (`expression` or `reactive`) to evaluate on the output of the decoration. -#' When an expression it must be inline code. See [within()] +#' @inheritParams teal.reporter::`eval_code,teal_report-method` +#' @param expr (`reactive`) with expression to evaluate on the output of the +#' decoration. It must be compatible with `code` argument of [teal.code::eval_code()]. #' Default is `NULL` which won't evaluate any appending code. #' @details #' `srv_decorate_teal_data` is a wrapper around `srv_transform_teal_data` that @@ -296,29 +297,20 @@ assert_single_selection <- function(x, #' first. #' #' @keywords internal -srv_decorate_teal_data <- function(id, data, decorators, expr) { +srv_decorate_teal_data <- function(id, data, decorators, expr, keep_output = NULL) { checkmate::assert_class(data, classes = "reactive") checkmate::assert_list(decorators, "teal_transform_module") - expr_is_missing <- missing(expr) moduleServer(id, function(input, output, session) { decorated_output <- srv_transform_teal_data("inner", data = data, transformators = decorators) - expr_r <- reactive({ - if (is.reactive(expr)) { - expr() - } else { - expr - } - }) - reactive({ req(data(), decorated_output()) - if (expr_is_missing) { + if (missing(expr)) { decorated_output() } else { - req(expr_r()) - teal.code::eval_code(decorated_output(), expr_r(), keep_output = TRUE) + req(expr()) + teal.code::eval_code(decorated_output(), expr(), keep_output = keep_output) } }) }) diff --git a/man/srv_decorate_teal_data.Rd b/man/srv_decorate_teal_data.Rd index 43bd3b4d4..370c32fa5 100644 --- a/man/srv_decorate_teal_data.Rd +++ b/man/srv_decorate_teal_data.Rd @@ -5,7 +5,7 @@ \alias{ui_decorate_teal_data} \title{Wrappers around \code{srv_transform_teal_data} that allows to decorate the data} \usage{ -srv_decorate_teal_data(id, data, decorators, expr) +srv_decorate_teal_data(id, data, decorators, expr, keep_output = NULL) ui_decorate_teal_data(id, decorators, ...) } @@ -14,9 +14,15 @@ ui_decorate_teal_data(id, decorators, ...) \item{data}{(\code{reactive} returning \code{teal_data})} -\item{expr}{(\code{expression} or \code{reactive}) to evaluate on the output of the decoration. -When an expression it must be inline code. See \code{\link[=within]{within()}} +\item{expr}{(\code{reactive}) with expression to evaluate on the output of the +decoration. It must be compatible with \code{code} argument of \code{\link[teal.code:eval_code]{teal.code::eval_code()}}. Default is \code{NULL} which won't evaluate any appending code.} + +\item{keep_output}{(\code{character} or \code{NULL}) Names of output objects in the environment +that are will be added in the card for the reporter. +These are shown in the card via the \code{\link[tools:toHTML]{tools::toHTML()}} and \code{\link[teal.reporter:to_rmd]{to_rmd()}} implementations.} + +\item{...}{(\code{\link{dots}}) additional arguments passed to future methods.} } \description{ Wrappers around \code{srv_transform_teal_data} that allows to decorate the data From c28334368b6a126c2955450912e7f6e9e817cd02 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:41:31 +0200 Subject: [PATCH 09/38] fix srv_decorate_teal_data expression check Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> --- R/utils.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index 29a1033fd..cbcab1ba3 100644 --- a/R/utils.R +++ b/R/utils.R @@ -290,6 +290,8 @@ assert_single_selection <- function(x, #' @param expr (`reactive`) with expression to evaluate on the output of the #' decoration. It must be compatible with `code` argument of [teal.code::eval_code()]. #' Default is `NULL` which won't evaluate any appending code. +#' @param keep_output (`character`) optional, names of the outputs to keep. +#' Default is `NULL` which won't keep any outputs. #' @details #' `srv_decorate_teal_data` is a wrapper around `srv_transform_teal_data` that #' allows to decorate the data with additional expressions. @@ -301,12 +303,14 @@ srv_decorate_teal_data <- function(id, data, decorators, expr, keep_output = NUL checkmate::assert_class(data, classes = "reactive") checkmate::assert_list(decorators, "teal_transform_module") + no_expr <- missing(expr) + moduleServer(id, function(input, output, session) { decorated_output <- srv_transform_teal_data("inner", data = data, transformators = decorators) reactive({ req(data(), decorated_output()) - if (missing(expr)) { + if (no_expr) { decorated_output() } else { req(expr()) From ba0e71ed6f54404b61434f68a1bd9dab96f15189 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Wed, 18 Jun 2025 14:12:09 +0200 Subject: [PATCH 10/38] rewrite modules to `teal_reportable` (#887) Merging this to a feature branch. The rest can be dona as normal issues. Thanks! --- R/tm_a_pca.R | 63 ++++++----------- R/tm_a_regression.R | 45 ++++--------- R/tm_g_association.R | 48 ++++--------- R/tm_g_bivariate.R | 45 ++++--------- R/tm_g_distribution.R | 62 +++++------------ R/tm_g_response.R | 36 ++-------- R/tm_g_scatterplot.R | 44 +++--------- R/tm_g_scatterplotmatrix.R | 35 ++-------- R/tm_missing_data.R | 123 ++++++++++++---------------------- R/tm_outliers.R | 72 +++++++------------- R/tm_t_crosstable.R | 46 ++++--------- man/tm_a_pca.Rd | 25 +++++-- man/tm_a_regression.Rd | 24 +++++-- man/tm_g_association.Rd | 24 +++++-- man/tm_g_bivariate.Rd | 24 +++++-- man/tm_g_distribution.Rd | 24 +++++-- man/tm_g_response.Rd | 24 +++++-- man/tm_g_scatterplot.Rd | 24 +++++-- man/tm_g_scatterplotmatrix.Rd | 24 +++++-- man/tm_missing_data.Rd | 24 +++++-- man/tm_outliers.Rd | 24 +++++-- man/tm_t_crosstable.Rd | 24 +++++-- 22 files changed, 400 insertions(+), 484 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 3929f475c..e5fb9c69c 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -44,8 +44,7 @@ #' For additional details and examples of decorators, refer to the vignette #' `vignette("decorate-module-output", package = "teal.modules.general")`. #' -#' To learn more please refer to the vignette -#' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. +#' @inheritSection teal::example_module Reporting #' #' @examplesShinylive #' library(teal.modules.general) @@ -235,9 +234,6 @@ ui_a_pca <- function(id, ...) { uiOutput(ns("all_plots")) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args["dat"]), teal.transform::data_extract_ui( @@ -353,9 +349,7 @@ ui_a_pca <- function(id, ...) { } # Server function for the PCA module -srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, plot_width, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") +srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, decorators) { checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -436,9 +430,11 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl selector_list = selector_list, datasets = data ) - qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes - ) + qenv <- reactive({ + obj <- data() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes + }) anl_merged_q <- reactive({ req(anl_merged_input()) qenv() %>% @@ -514,20 +510,26 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl ) ) + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Principal Components Table") + qenv <- teal.code::eval_code( qenv, quote({ tbl_importance <- dplyr::as_tibble(pca$importance, rownames = "Metric") tbl_importance - }) + }), + keep_output = "tbl_importance" ) + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Eigenvectors Table") + teal.code::eval_code( qenv, quote({ tbl_eigenvector <- dplyr::as_tibble(pca$rotation, rownames = "Variable") tbl_eigenvector - }) + }), + keep_output = "tbl_eigenvector" ) }) @@ -602,7 +604,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl ), ggtheme = ggtheme ) - + teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Elbow plot") teal.code::eval_code( base_q, substitute( @@ -679,6 +681,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl ggtheme = ggtheme ) + teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Circle plot") teal.code::eval_code( base_q, substitute( @@ -737,6 +740,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl size <- input$size font_size <- input$font_size + teal_card(base_q) <- append(teal_card(base_q), "## Biplot") qenv <- teal.code::eval_code( qenv, substitute( @@ -997,6 +1001,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl parsed_ggplot2_args$theme ) + teal_card(base_q) <- append(teal_card(base_q), "## Eigenvector plot") teal.code::eval_code( base_q, substitute( @@ -1039,7 +1044,8 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl decorators = select_decorators(decorators, obj_name), expr = reactive({ substitute(.plot, env = list(.plot = as.name(obj_name))) - }) + }), + keep_output = obj_name ) }, names(output_q), @@ -1131,33 +1137,6 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl verbatim_content = source_code_r, title = "R Code for PCA" ) - - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Principal Component Analysis Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Principal Components Table", "header3") - card$append_table(computation()[["tbl_importance"]]) - card$append_text("Eigenvectors Table", "header3") - card$append_table(computation()[["tbl_eigenvector"]]) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### - decorated_output_q }) } diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 9783df2e1..7aa76e096 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -67,6 +67,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -285,9 +287,6 @@ ui_a_regression <- function(id, ...) { tags$div(verbatimTextOutput(ns("text"))) )), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), tags$br(), teal.transform::datanames_input(args[c("response", "regressor")]), teal.transform::data_extract_ui( @@ -386,8 +385,6 @@ ui_a_regression <- function(id, ...) { # Server function for the regression module srv_a_regression <- function(id, data, - reporter, - filter_panel_api, response, regressor, plot_height, @@ -395,8 +392,6 @@ srv_a_regression <- function(id, ggplot2_args, default_outlier_label, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -464,7 +459,7 @@ srv_a_regression <- function(id, qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's computation") + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Linear Regression Plot", after = 0) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) @@ -528,7 +523,7 @@ srv_a_regression <- function(id, ) } - anl_merged_q() %>% + anl_fit <- anl_merged_q() %>% teal.code::eval_code(substitute(fit <- stats::lm(form, data = ANL), env = list(form = form))) %>% teal.code::eval_code(quote({ for (regressor in names(fit$contrasts)) { @@ -538,7 +533,12 @@ srv_a_regression <- function(id, ) } })) %>% - teal.code::eval_code(quote(summary(fit))) + teal.code::eval_code(quote({ + fit_summary <- summary(fit) + fit_summary + }), keep_output = "fit_summary") + teal.reporter::teal_card(anl_fit) <- append(teal.reporter::teal_card(anl_fit), "## Plot") + anl_fit }) label_col <- reactive({ @@ -1000,7 +1000,8 @@ srv_a_regression <- function(id, "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot) + expr = quote(plot), + keep_output = "plot" ) fitted <- reactive({ @@ -1037,28 +1038,6 @@ srv_a_regression <- function(id, title = "R code for the regression plot", ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Linear Regression Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### - decorated_output_q }) } diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 06c248a73..31a237b25 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -48,6 +48,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -232,9 +234,6 @@ ui_tm_g_association <- function(id, ...) { teal.widgets::plot_with_settings_ui(id = ns("myplot")) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("ref", "vars")]), teal.transform::data_extract_ui( @@ -301,16 +300,12 @@ ui_tm_g_association <- function(id, ...) { # Server function for the association module srv_tm_g_association <- function(id, data, - reporter, - filter_panel_api, ref, vars, plot_height, plot_width, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") @@ -346,9 +341,11 @@ srv_tm_g_association <- function(id, selector_list = selector_list ) - qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes - ) + qenv <- reactive({ + obj <- data() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Association Plot", after = 0) + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes + }) anl_merged_q <- reactive({ req(anl_merged_input()) qenv() %>% teal.code::eval_code(as.expression(anl_merged_input()$expr)) @@ -495,8 +492,10 @@ srv_tm_g_association <- function(id, ) ) } + obj <- merged$anl_q_r() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "## Plot") teal.code::eval_code( - merged$anl_q_r(), + obj, substitute( expr = title <- new_title, env = list(new_title = new_title) @@ -506,7 +505,7 @@ srv_tm_g_association <- function(id, substitute( expr = { plots <- plot_calls - plot <- grid.arrange(plots[[1]], plots[[2]], ncol = 1) + plot <- gridExtra::grid.arrange(plots[[1]], plots[[2]], ncol = 1) }, env = list( plot_calls = do.call( @@ -523,7 +522,8 @@ srv_tm_g_association <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot) + expr = quote(plot), + keep_output = "plot" ) plot_r <- reactive({ @@ -551,28 +551,6 @@ srv_tm_g_association <- function(id, title = "Association Plot" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Association Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - decorated_output_grob_q - ### }) } diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index ec4559fb8..6fe4e44f7 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -70,6 +70,7 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting #' #' @examplesShinylive #' library(teal.modules.general) @@ -339,9 +340,6 @@ ui_g_bivariate <- function(id, ...) { tags$div(teal.widgets::plot_with_settings_ui(id = ns("myplot"))) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("x", "y", "row_facet", "col_facet", "color", "fill", "size")]), teal.transform::data_extract_ui( @@ -479,8 +477,6 @@ ui_g_bivariate <- function(id, ...) { # Server function for the bivariate module srv_g_bivariate <- function(id, data, - reporter, - filter_panel_api, x, y, row_facet, @@ -493,8 +489,6 @@ srv_g_bivariate <- function(id, plot_width, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -559,9 +553,11 @@ srv_g_bivariate <- function(id, selector_list = selector_list, datasets = data ) - qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("teal.modules.general")') # nolint quotes - ) + qenv <- reactive({ + obj <- data() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0) + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("teal.modules.general")') # nolint quotes + }) anl_merged_q <- reactive({ req(anl_merged_input()) @@ -692,7 +688,9 @@ srv_g_bivariate <- function(id, } } - teal.code::eval_code(merged$anl_q_r(), substitute(expr = plot <- cl, env = list(cl = cl))) + obj <- merged$anl_q_r() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "## Plot") + teal.code::eval_code(obj, substitute(expr = plot <- cl, env = list(cl = cl))) }) decorated_output_q_facets <- srv_decorate_teal_data( @@ -730,7 +728,8 @@ srv_g_bivariate <- function(id, ) } print_call - }) + }), + keep_output = "plot" ) plot_r <- reactive(req(decorated_output_q_facets())[["plot"]]) @@ -752,27 +751,7 @@ srv_g_bivariate <- function(id, title = "Bivariate Plot" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Bivariate Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + decorated_output_q_facets }) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 5ae32a2fd..15d4405c1 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -56,6 +56,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -258,9 +260,6 @@ ui_distribution <- function(id, ...) { ) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("dist_var", "strata_var")]), teal.transform::data_extract_ui( @@ -402,8 +401,6 @@ ui_distribution <- function(id, ...) { # Server function for the distribution module srv_distribution <- function(id, data, - reporter, - filter_panel_api, dist_var, strata_var, group_var, @@ -411,8 +408,6 @@ srv_distribution <- function(id, plot_width, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -640,7 +635,10 @@ srv_distribution <- function(id, common_q <- reactive({ # Create a private stack for this function only. - ANL <- merged$anl_q_r()[["ANL"]] + obj <- merged$anl_q_r() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Distribution Plot", after = 0) + + ANL <- obj[["ANL"]] dist_var <- merge_vars()$dist_var s_var <- merge_vars()$s_var g_var <- merge_vars()$g_var @@ -655,7 +653,7 @@ srv_distribution <- function(id, # isolated as dist_param1/dist_param2 already triggered the reactivity t_dist <- isolate(input$t_dist) - qenv <- merged$anl_q_r() + qenv <- obj if (length(g_var) > 0) { validate( @@ -954,6 +952,7 @@ srv_distribution <- function(id, ggtheme = ggtheme ) + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Histogram Plot") teal.code::eval_code( qenv, substitute( @@ -1084,6 +1083,7 @@ srv_distribution <- function(id, ggtheme = ggtheme ) + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## QQ Plot") teal.code::eval_code( qenv, substitute( @@ -1297,28 +1297,32 @@ srv_distribution <- function(id, "d_density", data = output_dist_q, decorators = select_decorators(decorators, "histogram_plot"), - expr = quote(histogram_plot) + expr = quote(histogram_plot), + keep_output = "histogram_plot" ) decorated_output_qq_q <- srv_decorate_teal_data( "d_qq", data = output_qq_q, decorators = select_decorators(decorators, "qq_plot"), - expr = quote(qq_plot) + expr = quote(qq_plot), + keep_output = "qq_plot" ) decorated_output_summary_q <- srv_decorate_teal_data( "d_summary", data = output_summary_q, decorators = select_decorators(decorators, "summary_table"), - expr = quote(summary_table) + expr = quote(summary_table), + keep_output = "summary_table" ) decorated_output_test_q <- srv_decorate_teal_data( "d_test", data = output_test_q, decorators = select_decorators(decorators, "test_table"), - expr = quote(test_table) + expr = quote(test_table), + keep_output = "test_table" ) decorated_output_q <- reactive({ @@ -1384,39 +1388,7 @@ srv_distribution <- function(id, title = "R Code for distribution" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Distribution Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - if (input$tabs == "Histogram") { - card$append_plot(dist_r(), dim = pws1$dim()) - } else if (input$tabs == "QQplot") { - card$append_plot(qq_r(), dim = pws2$dim()) - } - card$append_text("Statistics table", "header3") - card$append_table(decorated_output_summary_q()[["summary_table"]]) - tests_error <- tryCatch(expr = tests_r(), error = function(e) "error") - if (inherits(tests_error, "data.frame")) { - card$append_text("Tests table", "header3") - card$append_table(tests_r()) - } - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### reactive( if (input$tabs == "Histogram") { decorated_output_dist_q() diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 3e24848a7..c59e72b88 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -63,6 +63,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -263,9 +265,6 @@ ui_g_response <- function(id, ...) { teal.widgets::plot_with_settings_ui(id = ns("myplot")) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("response", "x", "row_facet", "col_facet")]), teal.transform::data_extract_ui( @@ -332,8 +331,6 @@ ui_g_response <- function(id, ...) { # Server function for the response module srv_g_response <- function(id, data, - reporter, - filter_panel_api, response, x, row_facet, @@ -342,8 +339,6 @@ srv_g_response <- function(id, plot_width, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -413,6 +408,7 @@ srv_g_response <- function(id, teal::validate_inputs(iv_r()) qenv <- merged$anl_q_r() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Response Plot", after = 0) ANL <- qenv[["ANL"]] resp_var <- as.vector(merged$anl_input_r()$columns_source$response) x <- as.vector(merged$anl_input_r()$columns_source$x) @@ -572,6 +568,7 @@ srv_g_response <- function(id, ggthemes = parsed_ggplot2_args$ggtheme )) + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Plot") teal.code::eval_code(qenv, plot_call) }) @@ -579,7 +576,8 @@ srv_g_response <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot) + expr = quote(plot), + keep_output = "plot" ) plot_r <- reactive(req(decorated_output_plot_q())[["plot"]]) @@ -601,27 +599,7 @@ srv_g_response <- function(id, title = "Show R Code for Response" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Response Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + decorated_output_plot_q }) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index beedc7a9f..93b4a7991 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -54,6 +54,7 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting #' #' @examplesShinylive #' library(teal.modules.general) @@ -371,10 +372,7 @@ ui_g_scatterplot <- function(id, ...) { DT::dataTableOutput(ns("data_table"), width = "100%") ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### - tags$label("Encodings", class = "text-primary"), + tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("x", "y", "color_by", "size_by", "row_facet", "col_facet")]), teal.transform::data_extract_ui( id = ns("x"), @@ -509,8 +507,6 @@ ui_g_scatterplot <- function(id, ...) { # Server function for the scatterplot module srv_g_scatterplot <- function(id, data, - reporter, - filter_panel_api, x, y, color_by, @@ -522,8 +518,6 @@ srv_g_scatterplot <- function(id, table_dec, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -590,9 +584,11 @@ srv_g_scatterplot <- function(id, datasets = data, merge_function = "dplyr::inner_join" ) - qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes - ) + qenv <- reactive({ + obj <- data() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot", after = 0) + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes + }) anl_merged_q <- reactive({ req(anl_merged_input()) @@ -1016,6 +1012,7 @@ srv_g_scatterplot <- function(id, plot_call <- substitute(expr = plot <- plot_call, env = list(plot_call = plot_call)) + teal.reporter::teal_card(plot_q) <- append(teal.reporter::teal_card(plot_q), "## Plot") teal.code::eval_code(plot_q, plot_call) }) @@ -1023,7 +1020,8 @@ srv_g_scatterplot <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot) + expr = quote(plot), + keep_output = "plot" ) plot_r <- reactive(req(decorated_output_plot_q())[["plot"]]) @@ -1074,27 +1072,7 @@ srv_g_scatterplot <- function(id, title = "R Code for scatterplot" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Scatter Plot", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + decorated_output_plot_q }) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index fa8467f02..c0a44e07e 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -42,6 +42,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -251,9 +253,6 @@ ui_g_scatterplotmatrix <- function(id, ...) { teal.widgets::plot_with_settings_ui(id = ns("myplot")) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args$variables), teal.transform::data_extract_ui( @@ -300,14 +299,10 @@ ui_g_scatterplotmatrix <- function(id, ...) { # Server function for the scatterplot matrix module srv_g_scatterplotmatrix <- function(id, data, - reporter, - filter_panel_api, variables, plot_height, plot_width, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -334,7 +329,7 @@ srv_g_scatterplotmatrix <- function(id, anl_merged_q <- reactive({ req(anl_merged_input()) obj <- data() - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's computation") + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot Matrix", after = 0) qenv <- teal.code::eval_code(obj, 'library("dplyr");library("lattice")') # nolint: quotes. teal.code::eval_code(qenv, as.expression(anl_merged_input()$expr)) }) @@ -396,6 +391,8 @@ srv_g_scatterplotmatrix <- function(id, # create plot + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Plot") + if (add_cor) { shinyjs::show("cor_method") shinyjs::show("cor_use") @@ -510,27 +507,7 @@ srv_g_scatterplotmatrix <- function(id, title = "Show R Code for Scatterplotmatrix" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Scatter Plot Matrix", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Plot", "header3") - card$append_plot(plot_r(), dim = pws$dim()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + decorated_output_q }) } diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index f132b3ec5..fcf8feae3 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -20,7 +20,7 @@ #' @section Decorating Module: #' #' This module generates the following objects, which can be modified in place using decorators: -#' - `summary_plot` (`grob` created with [ggplot2::ggplotGrob()]) +#' - `summary_plot` (`ggplot`) #' - `combination_plot` (`grob` created with [ggplot2::ggplotGrob()]) #' - `by_subject_plot` (`ggplot`) #' - `table` (`datatables` created with [DT::datatable()]) @@ -47,6 +47,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -199,10 +201,9 @@ ui_page_missing_data <- function(id, pre_output = NULL, post_output = NULL) { } # Server function for the missing data module (all datasets) -srv_page_missing_data <- function(id, data, reporter, filter_panel_api, datanames, parent_dataname, +srv_page_missing_data <- function(id, data, reporter, datanames, parent_dataname, plot_height, plot_width, ggplot2_args, ggtheme, decorators) { with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") moduleServer(id, function(input, output, session) { teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") @@ -272,7 +273,6 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, dataname id = x, data = data, reporter = if (with_reporter) reporter, - filter_panel_api = if (with_filter) filter_panel_api, dataname = x, parent_dataname = parent_dataname, plot_height = plot_height, @@ -370,9 +370,6 @@ encoding_missing_data <- function(id, summary_per_patient = FALSE, ggtheme, data ns <- NS(id) tagList( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), helpText( paste0("Dataset", `if`(length(datanames) > 1, "s", ""), ":"), @@ -461,7 +458,6 @@ encoding_missing_data <- function(id, summary_per_patient = FALSE, ggtheme, data srv_missing_data <- function(id, data, reporter, - filter_panel_api, dataname, parent_dataname, plot_height, @@ -469,7 +465,6 @@ srv_missing_data <- function(id, ggplot2_args, decorators) { with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -532,7 +527,7 @@ srv_missing_data <- function(id, group_var <- input$group_by_var anl <- data_r() obj <- data() - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's computation") + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Missing Data", after = 0) qenv <- teal.code::eval_code(obj, { 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes @@ -700,8 +695,10 @@ srv_missing_data <- function(id, combination_cutoff_q <- reactive({ req(common_code_q()) + qenv <- common_code_q() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Combination Plot") teal.code::eval_code( - common_code_q(), + qenv, quote( combination_cutoff <- ANL %>% dplyr::mutate_all(is.na) %>% @@ -756,10 +753,14 @@ srv_missing_data <- function(id, expr = analysis_vars <- setdiff(colnames(ANL), data_keys), env = list(data_keys = data_keys()) ) - ) %>% - teal.code::eval_code( - substitute( - expr = summary_plot_obs <- data_frame_call[, analysis_vars] %>% + ) + + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Plot") + + qenv <- teal.code::eval_code( + qenv, + substitute( + expr = summary_plot_obs <- data_frame_call[, analysis_vars] %>% dplyr::summarise_all(list(function(x) sum(is.na(x)))) %>% tidyr::pivot_longer(dplyr::everything(), names_to = "col", values_to = "n_na") %>% dplyr::mutate(n_not_na = nrow(ANL) - n_na) %>% @@ -929,15 +930,11 @@ srv_missing_data <- function(id, if (isTRUE(input$if_patients_plot)) { within(qenv, { - g1 <- ggplot2::ggplotGrob(summary_plot_top) - g2 <- ggplot2::ggplotGrob(summary_plot_bottom) - summary_plot <- gridExtra::gtable_cbind(g1, g2, size = "first") - summary_plot$heights <- grid::unit.pmax(g1$heights, g2$heights) + summary_plot <- gridExtra::grid.arrange(summary_plot_top, summary_plot_bottom, ncol = 2) }) } else { within(qenv, { - g1 <- ggplot2::ggplotGrob(summary_plot_top) - summary_plot <- g1 + summary_plot <- summary_plot_top }) } }) @@ -1113,9 +1110,12 @@ srv_missing_data <- function(id, function(x) round(sum(is.na(x)) / length(x), 4) } + qenv <- common_code_q() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Table") + qenv <- if (!is.null(group_var)) { common_code_libraries_q <- teal.code::eval_code( - common_code_q(), + qenv, 'library("forcats");library("glue");' # nolint quotes ) teal.code::eval_code( @@ -1142,7 +1142,7 @@ srv_missing_data <- function(id, ) } else { teal.code::eval_code( - common_code_q(), + qenv, substitute( expr = summary_data <- ANL %>% dplyr::summarise_all(summ_fn) %>% @@ -1188,8 +1188,11 @@ srv_missing_data <- function(id, function(x) paste(as.integer(x), collapse = "") } - teal.code::eval_code( - common_code_q(), + qenv <- common_code_q() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## By Subject Plot") + + qenv <- teal.code::eval_code( + qenv, substitute( expr = parent_keys <- keys, env = list(keys = data_parent_keys()) @@ -1240,11 +1243,13 @@ srv_missing_data <- function(id, }, env = list(hashing_function = hashing_function) ) - ) %>% - teal.code::eval_code( - substitute( - expr = { - by_subject_plot <- ggplot2::ggplot(summary_plot_patients, ggplot2::aes( + ) + + qenv <- teal.code::eval_code( + qenv, + substitute( + expr = { + by_subject_plot <- ggplot2::ggplot(summary_plot_patients, ggplot2::aes( x = factor(id, levels = order_subjects), y = factor(col, levels = ordered_columns[["column"]]), fill = isna @@ -1283,10 +1288,9 @@ srv_missing_data <- function(id, data = summary_plot_q, decorators = select_decorators(decorators, "summary_plot"), expr = quote({ - grid::grid.newpage() - grid::grid.draw(summary_plot) summary_plot - }) + }), + keep_output = "summary_plot" ) decorated_combination_plot_q <- srv_decorate_teal_data( @@ -1297,21 +1301,24 @@ srv_missing_data <- function(id, grid::grid.newpage() grid::grid.draw(combination_plot) combination_plot - }) + }), + keep_output = "combination_plot" ) decorated_summary_table_q <- srv_decorate_teal_data( id = "dec_summary_table", data = summary_table_q, decorators = select_decorators(decorators, "table"), - expr = quote(table) + expr = quote(table), + keep_output = "table" ) decorated_by_subject_plot_q <- srv_decorate_teal_data( id = "dec_by_subject_plot", data = by_subject_plot_q, decorators = select_decorators(decorators, "by_subject_plot"), - expr = quote(by_subject_plot) + expr = quote(by_subject_plot), + keep_output = "by_subject_plot" ) # Plots & tables reactives @@ -1389,49 +1396,7 @@ srv_missing_data <- function(id, title = "Show R Code for Missing Data" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::TealReportCard$new() - sum_type <- input$summary_type - title <- if (sum_type == "By Variable Levels") paste0(sum_type, " Table") else paste0(sum_type, " Plot") - title_dataname <- paste(title, dataname, sep = " - ") - label <- if (label == "") { - paste("Missing Data", sum_type, dataname, sep = " - ") - } else { - label - } - card$set_name(label) - card$append_text(title_dataname, "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) - if (sum_type == "Summary") { - card$append_text("Plot", "header3") - card$append_plot(summary_plot_r(), dim = pws1$dim()) - } else if (sum_type == "Combinations") { - card$append_text("Plot", "header3") - card$append_plot(combination_plot_r(), dim = pws2$dim()) - } else if (sum_type == "By Variable Levels") { - card$append_text("Table", "header3") - table <- decorated_summary_table_q()[["table"]] - if (nrow(table) == 0L) { - card$append_text("No data available for table.") - } else { - card$append_table(table) - } - } else if (sum_type == "Grouped by Subject") { - card$append_text("Plot", "header3") - card$append_plot(by_subject_plot_r(), dim = pws3$dim()) - } - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + decorated_final_q }) diff --git a/R/tm_outliers.R b/R/tm_outliers.R index ae60cfc8b..0f2a53c65 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -45,6 +45,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -264,9 +266,6 @@ ui_outliers <- function(id, ...) { DT::dataTableOutput(ns("table_ui")) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("outlier_var", "categorical_var")]), teal.transform::data_extract_ui( @@ -389,10 +388,8 @@ ui_outliers <- function(id, ...) { # Server function for the outliers module # Server function for the outliers module -srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, +srv_outliers <- function(id, data, outlier_var, categorical_var, plot_height, plot_width, ggplot2_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -476,6 +473,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0) outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -637,6 +635,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, ) qenv <- if (length(categorical_var) > 0) { + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Table") qenv <- teal.code::eval_code( qenv, substitute( @@ -755,8 +754,11 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, # boxplot/violinplot # nolint commented_code box_plot_q <- reactive({ req(common_code_q()) - ANL <- common_code_q()[["ANL"]] - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] + qenv <- common_code_q() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Box Plot") + + ANL <- qenv[["ANL"]] + ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -829,7 +831,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, ) teal.code::eval_code( - common_code_q(), + qenv, substitute( expr = box_plot <- plot_call + ggplot2::scale_color_manual(values = c("TRUE" = "red", "FALSE" = "black")) + @@ -846,8 +848,11 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, # density plot density_plot_q <- reactive({ - ANL <- common_code_q()[["ANL"]] - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] + qenv <- common_code_q() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Density Plot") + + ANL <- qenv[["ANL"]] + ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -890,7 +895,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, ) teal.code::eval_code( - common_code_q(), + qenv, substitute( expr = density_plot <- plot_call + labs + ggthemes + themes, env = list( @@ -906,6 +911,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, # Cumulative distribution plot cumulative_plot_q <- reactive({ qenv <- common_code_q() + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Cumulative Distribution Plot") ANL <- qenv[["ANL"]] ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] @@ -1037,7 +1043,8 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, }, env = list(table_columns = input$table_ui_columns, .plot = as.name(obj_name)) ) - }) + }), + keep_output = obj_name ) }, stats::setNames(nm = c("box_plot", "density_plot", "cumulative_plot")), @@ -1050,7 +1057,8 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, "d_table", data = decorated_final_q_no_table, decorators = select_decorators(decorators, "table"), - expr = quote(table) + expr = quote(table), + keep_output = "table" ) output$summary_table <- DT::renderDataTable( @@ -1321,39 +1329,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, title = "Show R Code for Outlier" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - tab_type <- input$tabs - card <- teal::report_card_template( - title = paste0("Outliers - ", tab_type), - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) - if (length(categorical_var) > 0) { - summary_table <- decorated_final_q()[["table"]] - card$append_text("Summary Table", "header3") - card$append_table(summary_table) - } - card$append_text("Plot", "header3") - if (tab_type == "Boxplot") { - card$append_plot(box_plot_r(), dim = box_pws$dim()) - } else if (tab_type == "Density Plot") { - card$append_plot(density_plot_r(), dim = density_pws$dim()) - } else if (tab_type == "Cumulative Distribution Plot") { - card$append_plot(cumulative_plot_r(), dim = cum_density_pws$dim()) - } - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + + decorated_final_q }) } diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 8a5bae411..33ef48db0 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -48,6 +48,8 @@ #' To learn more please refer to the vignette #' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. #' +#' @inheritSection teal::example_module Reporting +#' #' @examplesShinylive #' library(teal.modules.general) #' interactive <- function() TRUE @@ -225,9 +227,6 @@ ui_t_crosstable <- function(id, x, y, show_percentage, show_total, pre_output, p teal.widgets::table_with_settings_ui(ns("table")) ), encoding = tags$div( - ### Reporter - teal.reporter::simple_reporter_ui(ns("simple_reporter")), - ### tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(list(x, y)), teal.transform::data_extract_ui(ns("x"), label = "Row values", x, is_single_dataset = is_single_dataset), @@ -259,9 +258,7 @@ ui_t_crosstable <- function(id, x, y, show_percentage, show_total, pre_output, p } # Server function for the cross-table module -srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, basic_table_args, decorators) { - with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") - with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") +srv_t_crosstable <- function(id, data, label, x, y, basic_table_args, decorators) { checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { @@ -315,9 +312,11 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, selector_list = selector_list, merge_function = merge_function ) - qenv <- reactive( - teal.code::eval_code(data(), 'library("rtables");library("tern");library("dplyr")') # nolint quotes - ) + qenv <- reactive({ + obj <- data() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Cross Table", after = 0) + teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")') # nolint quotes + }) anl_merged_q <- reactive({ req(anl_merged_input()) qenv() %>% @@ -368,8 +367,10 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, ANL ) + obj <- merged$anl_q_r() + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Table") teal.code::eval_code( - merged$anl_q_r(), + obj, substitute( expr = { title <- plot_title @@ -427,7 +428,8 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, id = "decorator", data = output_q, decorators = select_decorators(decorators, "table"), - expr = quote(table) + expr = quote(table), + keep_output = "table" ) output$title <- renderText(req(decorated_output_q())[["title"]]) @@ -451,26 +453,6 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, title = "Show R Code for Cross-Table" ) - ### REPORTER - if (with_reporter) { - card_fun <- function(comment, label) { - card <- teal::report_card_template( - title = "Cross Table", - label = label, - with_filter = with_filter, - filter_panel_api = filter_panel_api - ) - card$append_text("Table", "header3") - card$append_table(table_r()) - if (!comment == "") { - card$append_text("Comment", "header3") - card$append_text(comment) - } - card$append_src(source_code_r()) - card - } - teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun) - } - ### + decorated_output_q }) } diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index 2fdfdf650..24f228782 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -120,9 +120,22 @@ See code snippet below: For additional details and examples of decorators, refer to the vignette \code{vignette("decorate-module-output", package = "teal.modules.general")}. +} + +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} -To learn more please refer to the vignette -\code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } \examples{ @@ -194,13 +207,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLqkQ11XfxQpFC6cAAesKgiSoHBBsZc1AD6sVA2MUEhRroA7rSkABYq7Km4uiBKurqMcACOgrQ17L6ipMTURIyKEFWOAMoAgow1raLxuv1DI6SiSgC+3UpoqOMq+eyVAZm6ALxbwbibfEIiY3vHwmIbPVW6pDBJUEmoBGmbt7oKYAAKAMIDX0ONw+sV2+ye4VIzA0SVEqDgBGuHxBmWg8DBX0mwzEM0B72RojgIg0YMJxNIsPhiPxyN0BAKRFoBDEYK0LFoUHoIiS9MZzNESNpyNSYNSwGAmMG2NGXwAurKytSwABZQSMfgyQGfMADUSiKDCUhazGMehQCDfIioY1gLBoOBfbpC25yIHOqpkhHkfhgpWq9WavDa3X6w2Ot3umCG2hRPR7BwuGkuiO0ky0ajkRhggByjgAMnmk06XZtut1aCZdOwVJn1JodDZbBUbqIihBWAN0OxlgASBplXuExg6LrzJRgOayoA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLoDCAEQCSAMreuvxQpFC6cAAesKgiSmERBsZc1AD6SVA2ieGRRroA7rSkABYq7Fm4uiBKurqMcACOgrSN7BBipMTURIyKEPUAgr6BADIpumkYWYiIjCPjSgC+AwBWRCrpANZwrKKVebYF-HAmUMKk6QT8tKIE6Rtbu-vA0PAHWXIAuu5oqJMVCV2HVQnldABeMERXCgvhCESiSG6eHCMQgwb1KYwdJQdKoAjZUFY3QKMAABW8QzJsMxJKSyKy6RipGYGnSolQcAIGJJ9Ly7z0ULJizGNOJfNEcBEGmRUplV053N5fJJBFKmwIYmRWhYtCg9BE1w1tC1BwlqvqWUZeWAwBFozFYG+32qPLJACEALJYADSWAAjDTSWAhgBxVx4EPOADygV8AE0yQNLVi5LTU-V5dzyPxke6wN6-YHgyKI8mM5mYJdaPEhfYnK46Xz0xasSZaNRyIxkQA5RxjMXN+optOggYDWgmXTsFTd9SaHQ2Wy1TGicoQVhDdDsf4AEla1X3UsYOn6KyUYGW3yAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index 37a215e71..1a6589f1d 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -147,6 +147,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example @@ -233,13 +249,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLqkQ11XfxQpFC6cAAesKgiSoHBBsZc1AD6sVA2MUEhRroA7rSkABYq7Km4uiBKurqMcACOgrQ17L6ipMTURIyKEFUAwgDyAEzxugODSgC+3UpoqCMq+eyVAZm6ALwrwbjLfEIiouu6u8JiSz1VuqQwSVBJNRI1oqJWEGcXF9RQ9HD+GwpgWDgDzEzxI-2253ej1QJFEeg2qSS4VIzA0SVEqDgBDe7wuqWg8EO-zG4OWuN0cJEGkOlKxpHRmOxZPJuk+31+un+AGUfnTdFoWLQviJEKTISyCAUiLQCGIiWBBKhggBrOBilkXWkaOD8eWKlVqvDM8kwYSaKLw3QAMQAggAZLnOCEaqomWhhHWHBwuY0XbrkuTO3H3R6iTqHRHI1H0jFYnHk-GwS3Eobqlla0g03lo2NM8Xktk-eU8qmZgWMIX0faio353GS6Wyg4bcuVkRJBsy06pYDAFPjMAAXUHZSZhBIBHBnLAdhqQXgZH+ckDvveGc9f3HFjTGtN1HNIi9Tidq4ubo9uo2todrjrVX9uIf9+W3W6tBMunYKnI0e0cBstgVOcohFBArA2ug7CzAAJA0ZQwXCjA6F0kxKGAEyDkAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0lA0g0JA1RKIrBB0ZjMdQoPQ4NQkQowFg4ASxMSSPSYRjyYTUCRRHpIZk0tFSMwNGlRKg4AQyeTMZk3vzdPSFqN2SDZbo+SINEitVLLhKpTKNXVKdTaZD6QEafrdFoWLQqSJEGrOSaCCUNgQxHSwAAhACyWAA0lgAIyuk2YvUaOD8X2BkPhyNR5EXWhxRUAMUGowCzg5qdMtCicaRDhc6tl-Q1ckLsvxhNEvSRguFooNkulVfJ8tgiuVI1VeB70ZtOshMc7RtH5LNNN91u1pDtDqdYhdI7dGo9Xp9kPtjEd9BEV09tG9H1ywGAg8WYC+Xyq3bAgwA4q48EqwPmABrs78sEGLxPzkOtZzHZcy0tV8PxTKMYHTTNyycAsILqEwS2g3QczzVxt0xGtqyrIj+n6WgTF0dgVHIDttDgGxbBqDFRDKCBWEGdB2DQVAABIWiqHjeL5RgdD6ZYlDAJYviAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index 9e651dc70..4f3fe3298 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -107,6 +107,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -196,13 +212,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlQDCAPIATHG6-QMVpuqkHaLD0PCi7ABitNTkjOy0og4upVpokRyjpZsYJpMdpe0StATc7ACMADJyL129g8BnGtMAusPU+2ohw+XymjFEP1KUHEBHyLEmMi6AF8ukp9sMVHl2OMUroALz+DK4cZ8IQiGYE0nCMTY7qVXSkGCJCSJaGiIgEWiBKwQWn0+nVEz4wlBRJhUjMDSJUSoOAEPn8+kpOZ6AkKMCjdXEumK3SiOAiDTC-WG0jS2Xy8a6yoA+gG4XqgDKBrlpF0e0YXPoIkQWqt1thRBuYmFHq9IkSgeDCxSwGA6s1YB+kN0lrAAAUAWQtbp1XZWLKc3nqoF4NmwC9tdb6SbXXB+A6M1nSH6ddaTLRQvXhYsAIKPR2uNv8t6KuRVxUeikiqBi0ISybmuUK3XK2Cq3Mawat6u1o0EvdmmXL-26232tVgZ2m90scNiX14U+KqMEEMEsNQb1wSP5INvmMMjjBNtyTFM00zKBy1KPMCzgIswDsEtGQoFsK3HZ9+UPbtLyQuBS1Qndq10GBhE0SIN22ZwJ2rDsuwbAk+wHIdq1HEd-VHLouloIUNlUSVNB0GxbHKOlREKCBWF7dB2H2AASeooXQOT9UYHROiUJElDAJEfiAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0hI0lBRKIiARaGErBB0ZjMQ0TEjMmloqRmBo0qJUHACBTKZjMm89JCFGAFqMBTCMVzdKI4CINEjJdLLqz2ZzxXVqFB6FKkQKAlL2aRdFoWCT6CJECKQSrdAQShsCGIkYbGMaRFcbbQ7fsLZaoVBgMABUKBV8vqLvZiOdrnAANEW6AVYQZeVx4ONgLwAeUcADkHABNWMBrAAWQLYACDkGdkGAEZS+WE1WAEylvx2OwAMWFKYFACEi1gANJYZtgfphuSh71yvVwfhasAJpPmsUqky0KKzpHtwajAKuFeUsdcideuqOxGQukMpkKtkRg-c3K8+eBvCnzHTmWQz+3pXvylqhq1Dzjq8oGka6oImab4PpS1q2vakKOs6cCughnqwVymR+gGIxdsGk5hhGZbRqWi7JlUAoZtmealoMxZ1hWVa1t2ZZMYMI6UWArYdl2XF9oOw4CkelonphdQ-pu-JgAJQ6cf+mIwBctBxHy9hOM4hGruuUm6Nuu77qJ74iboR79P0tA0uwKjkDe2hwDYtg1BiohlBArCDOg7BoKgAAkLRVD5vmSowOh9MsShgEsXxAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index 09fd2e2d2..07aea2ef5 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -154,6 +154,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -267,13 +283,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlQDCAPIATHH+GRgmzPDs-QNdAL5dSmiowyp57BUjsQC8m1C4G3xCIqK6O6QwiRKJ9NostIFw692VuqGnu4lhpMwaiaKocAITxeLxS0Hg7wUYGmUP2zxBojgIg070RyNIfwBQI2IMq1Cg9CRkLAAGUkYDSLotHcCSJELCcbiCPkiLQCGJ3tTGPd6CJEszWezRMUMsBgFCYWAALpSuRw3EvNEUuD8YnECwM+G4ky0UIq94AMQAggAZEmuLWVLoguWM1jvFKfULfdQY-6A4G4sGwPQ7CWDTUKpUonbBt1Yz0K-GEvx+0nklFcnl0wMK3QCtkcnZJ2lwfkszPClJi-0DKEy22WxUJ8iquOCVBBADWcFTCpgwk0kV9umNZuc8rTOr1dd7pvNjKtjMrIMYRGyiRM6jglJ2jq+P3DHsnu3BPdLber6NRNcx26reIJRLjZOPOd5cHpeB3lQzQs5NIf+cFYhFQRL0IBtKsqDkGNb6nGdisACh4gsOEFjv2O7Wi8M4vG0i7LquHwbq6Z7YlW3oQnGkqgUeFInui+GRri0bXroUK3hR94ps+F7pgW77Zp+fJvr+xbioBZbAWhYHoghUJ2NUgTwGQsEvPBo59hOVYoVOzxdF0tAmLo7AqOQm7aI8ci2OUzyiIUECsEa6DsEsAAk9SlA5iKMDonRKLMShgLMUpAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIZMYGkJGl6NoWLQwnBgQM6rookjMmloqRmBo0qJUHACHiCQTMm89JCFGAFqM2TD8QzRHARBokXyBZdqbT6QyCdQoPR+Ui2QF+bTSLotFiZSJEFyQZLdAQShsCGIkWrGNj6CIrgbaEaPrlgMA2Ry2V8vnJubq6sLlXB+PL2QBxVx4HWSky0KK+pEAMUGowCrh5BP6DPdodYxNypKi5PUoppdNDdSZsBZuidI05IaTXqVgsh3spYsLNalMrlrLAipFqvVFrgWurnr11ttJr7lv1hrEB3CDorizArrTrdrIqjnYTAA1tavdDALrQ4mXY-HnB7PeHI37IaeE0XdCnkxe6owiAU0mcjSrISSyRT83FB8S3gf1nSHSVGx-XQoKpAsJV1aVZWof1u2VXszQ1Add2HKcbWNSFTXNSdRxnTJ53ZSsXTdF9ILrcgb3LdksAAWRwy8Iw3XQ70TXUnzqFcGW6T91DgaC-xzAC4KA1sQLLBcq1otd0IbejpJbYckI7Ji0MFIisMHJSCTwsdCInOArWnO050dSjF2XIzlI0Li2S8AB5RwADkHAATXY3Ury4niH34x8QX6fpaBMXR2BUcgAO0XE5FsGp8VEMoIFYQZ0HYNBUAAEhaKo8vyvlGB0PpliUMAli+IA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index a064a26fe..8f2fc4e71 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -116,6 +116,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -189,13 +205,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6urSMtKJxVTWiSgC+ihBKaKj1KnnsFf4ZugC8A0G4-XxCInUjdKKkfRCVlaQwiRLJtaQ19IKa1v3L-luJWizDo1CJYdvqpImiqHAEi0dHKdDwFwpg1bU-4yWb0qojgIg0F1B4Puj2e7DONSg9BEiQI+SItAIYj6v0aPzkpR+AAU4EEeAAZCgSAr4w7LNpHBm6NptWgmXTsFTkZiWHQ2WzlIGiQoQVgAQXQ7E6ABJBLRSjLQYwdIw2s0lGBmgBdIA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXQBBHwCAGWTdVIxMxERGRpalAF9FCAArIhU0gGs4VlEK3Nt8-jgTKGFSNIJ+WlECNLGJ6dngaHg5zLkAXTcILRZRAEY2ghLxgjE00TgRDTh+dlqujujFoUHoIk2r1o73OuWAwAUYD6zURl0uVQIAKRWAAsoiqoivAB5RwAOQcAE18bpEQFnAANRFyOS4QFfH7kfi6AC8ulJjmaKIgwyUaFQbRUxQBEDqmR5IVyrJluj4QhEonlquEYmldTqpBgaQkGR2pBB9EEmmsgL1IVNaWB8syaWiZvUG1EqDgmJttoV4VOel5iOR+N9tvZ3tI8sjGk+Xp9yr9epebzE8uBoPBcEhadh4XhIaaKLAaIxWPqAHFXHgaWAAEI4rAAaSwDyZLPDftjnPliMbLbbYaTyZV61ocSDugAYvVmnSlaO9SZaFE-vLZ-PXCPbcNk52d7pRG7wg6WE7ci6om6457vbrR5lA32kcXh0uV9RyIx5Z-v-H7y7W1gQ1XkQIeRclzHL8JxEeUHBcIDdD3P0D2TCRGCIQRUDPH9eWdV1mFvBMH2TJ9YCnIt+jwJC-xkX9aC-GQAMTKCgXuDN7ggpC6hgcdJ3gpxtyXFDd19FDhmGWgTF0dgVG-d1tDgGxbBqZVRDKCBWHqdB2DFAASQRaCqAyvkYHRGGGAYlDAAZLiAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index 2a617112a..a2ea8ffb5 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -135,6 +135,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -223,13 +239,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlTCtLKJxur0E-RWmHbrsWroqugTsCoSs1Iuli1qiq7qLsFuLUiyLcrbl3ZVDfYyiwMBaALp3g1DiJuqkHezD-Tf3d12VAF8lACuko0KhBio8gszildABefwZXBjPhCEQDRFo4RiGHnXSkGCJCSJaqiVAkURwPH43TUKD0OB+RGLLBiCkQKm6AAK7VImzwY3xZI5XMRKUSYVIzA0iXJcHmQtpKWg8AR2zAXyuqyV+KpIg06v1CtIctQCpptPO9MZzI1AGUmSbdFoWLQGSJEDqzlbKgR8kRaAQxOrXYx3fQRIl-YHg6JihkbostQKHqVFUsVngNQdGEc5Cifb7jRo4Px1YsCMtvb7zjBhJpInpEQAxACCABl7c5C7XKiZaKEy+r213XEX8f9aQXdbpQuqJVKZab5YqJ+cVbBmxqUzXi07DYiSyvzWu+3SGUyK2BHQbSC63R64F7Bev8TGgyHEWGI1GP3GEyCJNNUuVM7nTBYwA2PYUBgfNez7Y9hxZKCBQQ2t62oRsRBHTtu3Q30ByHctWzw8daynSclSnLouloExJhUchl20aljjKMZREKCBWDbdB2HBAASepSiEqlGB0TpgSUMAATuIA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0hI0g1RKgSKI4OjMZjqFB6HBqEiFGAsGJCRBiboAAo9UiiOkwjFk-FMlmQzJpaKkZgaNIEuAEUlkzGZN56SF0hajbkguW6YkiDRI7XSy5SmUazW6ClUmnKsABakG3RaFi0SkiRDq3mmgglDYEMRIh2MJ30ERXL20H0fXLAYAqkZqsBfL5VY1gABCAFksABpLAAJm5ujpXgA8o4AHIOACadLkch5psx+o0cH4tNTGezebwJs1MAutDiSt0ADFBqMAs46-XTLQos2kSOx653WT+pra93dFEkcLReLDahpbLNQrYIOY4su8uG7bdZDG-vDxuyebqa2bTrSPbHc64K7L1PdE9b1fUhf1A2DICwzRTIo3POMEyTYFrWcAANfM6SwQYvFcMAa0net7znK1MOwt0AN7ahNAHedR3HfDTRMGciOHWil3rVc5Q4uoOP6fpaBMXR2BUcg920Eka2qEFRDKCBWEGdB2DQVAABIWiqJTlOJRgdD6ZYlDAJYviAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index 556c87b34..0bd884ff8 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -146,6 +146,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -317,13 +333,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlQDCAPIATHG6-QNKAL5dSmiowyp57BX+GboAvMtBuEt8QiKia7o7wmKL3ZW6pDCJEomiBIHkjJFEpKfn59RQ9HB+6wpgAGV7qRHs9SCN8kRaAQxP8tmd3qEDilEmFSMwNLdUHACG93ucUtB4Ad-qM4Ut8bpRD8ceD1tSRJjRNjcRTKbpPt9frp-gCaRpdFoWLQviJEOSEeyCJDoWIDkLGCL6CJEtKoTDRMUMsBgKTBv8ALoG0qswgkAhwnlgQSoIIAazg-zkcnh7PODNpcH4JLNFglbsqMGEmkienWADEAIIAGQBzldAZMtFCXoOUdjrkl7y6lJdbMqrGRGVRoXR6lIWJxeMphNgYatZLw+fd-LpVNbldZWfxnJ+Pr5jPBCqVYv9AbVsv262HorgqplGq1QR1erGYCNJsWvoteCtNvtjrAzoTbo9GlTf2ttqgDrHbqD1BDIjTMbjJ-ZSZT3ojr8zbpz+J5t2bQdIk9CFusKJohiFbMlWzaVLWxKXo277vGebYYZ21bsr23K8q2grCrO4pNt27wThq8rEcqc6UScCH4ikK5gI2G6MRRW4AAqfGQlr-HYrDYvxYB2NUgTwHxu7-MQfrSVeB5OhxuhAQG7aDheugAHKONG0ZofiD5PvW6Zvspn6aaZf7sgB2YGaItAAF5zuBRZBCWZZMiyOHvEh9arne+IYQcWFwV2al4f2hEzrRpEGRRC5ytONEqvRmrMbqrH6uuxq6Kask7qU-z7jeh7HspGGacV163mRalGbQoYvhm8XnBZ366FZjG2ecqn4owRDZIkJjqHAbZQaWMHYYxfk+qhjHBfSHZhT5PZfH2l4DrSRGKiRgWUml1G7bR87qicGUBTlm7-DxUBSUVolCYeD1iXAEkUKQTp9aeraaTpemtYGwaNc+P4teZyaWb+3XNt95xtMNo3jcW0HltN5EbHddZzdlrWLeptLoxF634YC0UpXAcXKYdyXHaliXpdqmVsblpq3fdVqCcJ8mve9UnlRjlSVR1-36cpDVNWDZmC6YkMdV1GM9ZUPUAV0XS0CYujsCojzltocA2LY5RnKIhQQKwkboOwMwACT1KUtvUowOidBMShgOMBpAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0hI0ncwuRGHEiKR0ZjMdQoPQ4NQkQowAECASZMTSN4ShsCGJ6TCMeSokjMmloqRmBo8ag4AQyeTMZk3npIfSFqMeSDZbpRDSpWzIVqROLRJLpeqNbpKdTaUqGdqNLotCxaFSRIg1XyzQQObQuYjIQ7GE76CIrl6fQdwsBgMqRqqwF8vlUTWBBgBxVx4XT0gBCAFksABpLAARh5mbAuYLWAATPS5HJeWbMfqdXB+HTk2m3Y26jALrQ4ordAAxQajALOBvdky0KKtpEjseud3k-oa+umuqsQW5YVRUXqS5GqUyjXy2CD6OLPAbpu23Wau8S4838kWmntgJ3+2O51wV3X5dZU9TkxCRf1A2DYDvTRTJI0vWN40TYEO3TKpszzQsSwzdDKxrMA60nRtmw0OdrQrTCu27XtqE0Ad51HcdCLNadZzbSEF3HF9dFXWV10A7pejSegt0hIURTFQ9jRPWUz3gdsVUojViPvZSnxNQDXypd9rU-A02XA39-yYjUoJ9MCfyDOAQxA-YuPJWCo2TGN6UQuzMSTVNULLcji1LHDCzwtCwCwQYvC8+ksGcFM-AAeQAOSwnjGz47sHz00jdDixxRlGYzZWo2iRHoxc8vJFiMo4pdkpvFLZVEWgAC8rOE7dwl3fdDSkrjZIvJyr1KtKdSRVSj3U1K3ytMtdKGgzLKMtzTNAv0LMg0MYNyOC+oQhNdA8ztsPLDDfPw2qiLvDLlX2gaez7Oj2IYic3PKtjhweriksxU7MUYIgCjSM4uXvMS9wktTpPs3IFXk5yALOvThsfUbwdlCaPy-WaXUUj01t9b8A1-azoI+DbHIUuMdqTHzArLEKwr84KotihLay+pTzperKcuu5FbqK+6SqemcKrejTuJqvLun+9Q4CBndxIPMHush89of6rjlIRvTFdFupUZ09GVr-LGTJx8z8cswmwwc+CXIp5Cqfp2nwoZ6L4sS1m6vZpFOdytyCv7PnXoFnXTCFl7KvemrTR4-p+loExdHYFRCQPbQ4BsWwagxUQyggVhBnQdg0FQAASFoqmLkutUYHQ+mWJQwCWL4gA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index f90d7cf52..02c88b26d 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -86,6 +86,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -225,13 +241,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6usTmpIy0YnH+GRgmzPDsFZW6tPy6ALxVHWAAIq54ugpgAGJYk6WTAJJ2cxNgzgDKK5MACsvjkwDis-tgAHIAMltgAEJj82DnjlcAgntyuJ2VEkQ6jBDwZH6pnUpCIjA6EC6XQI7AATKV4bpEQBGBFo3SojGlTGw96fLrUKD0ODUURAmGTACyJBYBHyrCuWDgqEE9DoBEmikhXTx3MqhIgEkEUCkiRMsFo1FYQPFGjBEKhlRhmIAzKU1boNRqUdj1djeYrdITiaTyUMDjIYFBlByTgAJEkiG2MohWixwTn4g1dVBEFmEzQkM0ADg1ADYAOylMMABlKABYoxi4xjMcik8jMTGMGHSgBOb2VFhwYIDGEqgCsSYrFdVMcxFZjFfzKJViPjdYROdKocLXn4qDNKow8a7SdhGDTI9K2Y12cR2aT2ebumzWZHff4cHopDNE5xGG106R3ZPR9HZ67F4n565lTvulE3AaWRSLTacAVXR6QORiEbHx8lURA1GwiQ-gMT4wJEn74kqQyjFcMxXEsVwbFcuxXEcVwXFctxXI8LxvIBhqiLQABeegDABcG6IwzKEgQVH2E4rhAX2rAlowQKiGCpDsFBMFwvWMaILCMbiaUAF0Qx6jMQ4LhyH2OgQIIzGCSI7AUmAohWtQ1BXPA-C0IIMBXISjBSFcJB0D4nJSSm9GRHJQIKc4fYENaTH6XAvSQREmkwm5pRTM85zrO5DmlE5jHyaxfYAI7CmQeTSgMfxgjA7DSciMYpuJHlEKIpBkulECZdlKbBvlMZ9qgjBECYeRAhljBZdJknJg+XIAL5cgAVkQKiJAA1nArCiMUGS2Fkg3DWNE1fnNECjeNQzVGQdRiFcG21PUohXD09mdMtq0cJMT4iAdJyXdtJxHWA3qnQt60gZt+1XLd12lNpD1ApMu1gQ9SlKFyShoIOWQqHkX4pECJSdHwQhXUCSPCGIX6VKQMCJBIiSiJ5pDkIwkRENjgR1KEmMEkSJL-WA6yE8TpO7lae2hHMtFaCwtBEijAx0MV1NQikiRhLUIL46gcAUkBhopNA8D04DH14LRUKiCSMu7pBWsaFLMvC4aRq034AyTOseu7tzdR82IiCc3Lxt0kNTGlboNu82ycCJC7tBu1NQTAMAANvXtd0ALoR32xuPlbvlmpMxZQFcEgDlcW47sdTuGjAwiaDBrmsSRsddGCW70X5LEuCXpemLQoQJwMoXhWxdcPoaMddKL4vMProjS7LdcK7AzEXc+33q10TXUMTMqSsTBtD3XJsmvTlsiBoHs83bDtqznio2+7oegaw4H8I7K9VPkrsNAM3PUGpvs3-7GMpMH49XZMUf3IDZ-A7XUumtN7kCrtpRCJxkInFQicTCJxsInFwicfCJxCInFeNnK+edZ60ELgMNyU97yANIlbHiVsl5G0NMaOm5sGakM9nbUQe9iHOxfm7IEDDvbP1vpNd+IcdIT2-hHH6QwkrWk0KQBkJxiDFW+qseqjU8ici7iQkBTdBiTDESlSRO0iolSuAopqpBMEr2wQXEQRca6ELLowCu6jgrWMqE1RuVcW4RWsR3RUnj7xek6FyLktATC6HYCoYmIJtCfiUmUToohCgQFYM8dA7AIYABJBC0FKKkzWjBfi9SUGAHqEcgA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXQBBHwCAGWTdVIxMxERGRpbahp8sALaOrp7G4aUAX0UIACsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI0xeW1jeBoeE3MuQBdN2h0NpVi9gHM3QAvCFcrgBnwhCJRIDdODhGJfhA6nVSDA0hI0hcwuRGHEiCiwoxaFEEUikdQoPQ4NRoQowAECFiZLjSDCCUTaaDEaTdFoWLQKZDoXRRKQSdy6pk0tFSMwNBjUHACGLxRLcg89EDaX1mhyBirdKIqYqWUDDSI5aIFUq9frdOTKdTNXSjRoeXyBWJELqubbdAQSksCGJobzCR6TgHaEGnrlgMAtU0dWAXi85JzfXUzca4PxodawPUAOKuPC6WlYepeEtVWkBZwADVpaZt+pgR1ocQ19icznTGaIjD2jBz0IcLj7vpMRJHQIAYvVmnWW9y5vrmz7uZLpbLjpbFcqVZl1TSC0MAt7J7RqNjoVPrzJ5fvl+L7VSTwEXSyKPxUEsyKIvTwZ9uVDKEgXzAAFeoKwAWV8DkywLAA1QI-DsJsJ1tf1A2DIFeWoQQ4AjHCY3COMEymZMXiqSDoPqOCfAQrUUICNCML9X4wCg2CmOQ1D0LAOR1wzA1PxnRC-AAOSQ5w7F0YxnEknxdAAeVnXQpJ8RwvDsPwVMki8Mzba8OxEUce2AuphNtLNXVNT9H2tDd9VfR1EI-c0WVDfl6EhQDMP1bCo1wt0w18oigujLYyPjU9KJTazfVs8hc3Azii2rRD6iQhdeMaABNDDLKRYzNE7czx2KuoByHcSx17KrTGnVLdHnRdXGcldgNXLqNx6uY5loExdHYFRsXUTQdBsWwai5UQyggVh6nQdg0FQAASQRaCqNb1sNRgdEYOZpiUMBpheIA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 6d2f03824..76517facf 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -110,6 +110,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general example data data <- teal_data() @@ -164,13 +180,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrquuAAesKgiuvxQpFBK4ZEGxlzUAPoxUDbREVBxugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQFbpQ-PyJ0KJZZhaa1gG25RCVlQHAosEi7KK1idwkEuyTpSbtHewiEBIF27YAVFXmtCbsAIylGAAMAKyPdwDsct8AulkAcgBBHpzHoAXzcM10DVowyM0MYsJ6MFaLDhxhRBDRkMqMNEwD+8OoaBCHDxpT6AyGXUqmLRBKyxPQ1A4dMYogp-UGUFENN0bPxwAUhFY1GFP0Jxh5GBM6lIBwFwCFIrFYAlfMVyqkLHFkt64llGgVqPZSuF2sYuq6YK6ShJWRUeXYPRSugAvGEMrhkQJhGJ3fzfSJRM6oZVSDBEjBYaIVBJkhl2KgWBRSAnItB4AHhQLhXyul0brp2CpyMxLDobFMeqJChBWID0OwSQASeoU9At1aMHSdJQQiBgME-IA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dOAAPWFQRXX4oUiglGLiDYy5qAH1EqBsE2Khk3QB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGXzUjEzEREZhsdrdYawA-LmfFaUAX36AKyIVNIBrOFZRCtzbI2i4EyhhUjSCflpRAjT9w5Oz4Gh4c8ycgAum5oOh8ipiuxFpldABeaK5XCLPhCESieG6VHCMTQgZ1XSkGBpGCvUQqCQZXLZfH9fq0Ey6dgqcjMSw6Gy2Gr40RlCCsQbodhoVAAEhaVRFotEMh0fW2SjAWyBQA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index f8c15278d..f6dfecb3c 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -100,6 +100,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example @@ -198,13 +214,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLqkQ11XfxQpFC6cAAesKgiSoHBBsZc1AD6sVA2MUEhRroA7rSkABYq7Km4uiBKuroAwgDyAEzxNQ2VzfXAwApgqIy0MCysSQDWcKxdALrjTaJwAI5JIhDsEIxEOex19XKKEAC+OwBWRCrDo6IlmbbZRycjrOc3EKccXZtdZa8teLpdPX0Dzy623cWhYoiaBAKxwIYiSMxEGjg-HYoN6UHoIiSkOhYguwQ6n3qE3GZQI7C6AAVqFAyO8fmA7KxUHA6V07Iw4EF4LSwNsdko0Kgmip8uSIFVUroALwBTK4Vp8IQicEyxXCXGtKqkGBJIiCUh0GTnTVVXR6g20GRJVHS3R0USkMWm52y4JJcKkZgaOHMskml2ummwPQywnvf0u+FwDS2qPe0S+p0Bl3U+hwfyhsAAZXT0dIulRtHRIkQ4fFyed2NoMJVBZYRYxcCxUOruNSBLAbzAk1J5MIJAIrLAglQwRGQLk8vLFaqcfI-FtXRHY5ZeAjAZgwk0URDugAYgBBAAyWecU5nppMtDCSNth5PrmnyZ2FZfLsnEYIQTgEiIvS-yQ2jK9qOuugbumEnrqKQPrRkmFapNA8CLp2XznjOV7UOQjC2ph2GwX6T4VqitYkehF5VjWtqgtQghNpRbaZB2XY9nWjCiAAJHOSIfkRybcQuMo0XRzY4uc7adKhRLdiSbGcQJvEXlUm5YbQO62g4LhgVUb4Brppr6W+Ow7LQJi6OwKjYdB2hwDYtgVOWohFBArAHug7CChxgi0GUnkzIwOiMDsuxKGAuzjEAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLoDCAEQCSAMreuvxQpFC6cAAesKgiSmERBsZc1AD6SVA2ieGRRroA7rSkABYq7Fm4uiBKuroAgr6BADIpumkYWYiIjE2tSgC+ihAAVkQq6QDWcKyilXm2BfxwJlDCpOkE-LSiBOnjkzNzwNDw81lyALruaxrpWiyi6VD8otTtZ2LsAGK01ORGOxdg4XNVRGh4hwssBgAowP0WvCrldqrsMHdSERGHJcUpHoxRO0CKUJgQxOlRHARBo4Px2ATaFB6CItqTaOSLnlYfDEcjUaZ1JsCc9Xu88RB3EpIe0VCV2HVQnldABeJURXCKvhCEREtXa4TfRX1UgwdJEQSkOgyebG+q6C1W2gyB4sVW6OiiUgKiD2v3qqDpGKkZj3USoOAEH3+-1ZL7u3nNJF4O0xqk00ju9ORzbhyPRmP+6jM6kJsCBak53SM5kiRDwzW+wt+klksTumssuBsttciI8hFJ-nVKO8gDirjwunhACEALJYADSWAAjPDcY3m37s7T+GWGhOG6nCzANrR4no1T8Gi1As5N1v6iZaNE6e7r7fXE3myMf8e5A+LbhHAEjYhy3Cuow7qet6x71FkQbRCGQqUhGo7foWcawJe06DgMKYYTGz4AjI7rEYCqH5nB-oih2TyAVurYcu2aqPNQgjdkxnILP2cJ4cmKLVCKAAkO7kPwAHUdula7nR7Gcey3EwnxfJgIJ1ZPKJMniZJhEnmeF7uqCX6Pr+hZmX6Fm6GZIwjLQJi6MCqihpoOg2LYtRNqI5QQKwDToOwkLCYItDVEFVKMDoOJDEoYCDFcQA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index c761018da..bc90e89e7 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -100,6 +100,22 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } +\section{Reporting}{ + + + +This module returns an object of class \code{teal_module}, that contains a \code{server} function. +Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that +the reporting functionality will be turned on automatically by the \code{teal} framework. + +For more information on reporting in \code{teal}, see the vignettes: +\itemize{ +\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} +\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} +} + +} + \examples{ # general data example data <- teal_data() @@ -196,13 +212,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6ujCkBCyicVU1dRWmRIy67Fq6KroE7AqErNQDpQNaoiO6A7CTA1IsA3K25RCVldW1jKLAwFoAunsNUOIm6qRt7Bt1O-t7iqu6AL4tV1s7A6iMtDAsrIkA1nBWAMDg1RHAAI6JEQQdgQRhEbKXJpbJZKR73ABWRBUAKBomKGVsWWxuMBrAJpIgeI4A1eEzwUzA9NmYE+31+NMW9yUaFQDRUeX6DxSugAvP4MrgXgJhGJxVVZSICS1KqQYIlSIkCAjRKIgvQRMK1mtqFB6HA-BKBgBhXX1OzmqJ4VVrUIKlKJMKkZgaRKiVBwPquk0paDwBV0lEM6UPE2VcEiDQKxNBrUBoPG+Mms0Wq1MgDKlrTui0LFoTrgiBGIfjBHyOII8olZa+le1DdoTYJKXezOjIL2pWDg2GjLGMaZM3HYHmjG5sezJtTGjg-AVI4IQ1Zc8Wi6X62EmkieglDhc+4PbX4MjXCvPzkvS5MtFCd4lADEAIIAGQLrjjeN7mzOQn0qVgPQyL1Qh9M5-UDYNANDDJw1PJkWRdJC1hXUgU2LP0M0Qg9KlzS1IzAIsk1w1sK0NKsaywk160bZtS3LdtmK7MRCSCPsMIOYd+lHVlxlZadRlnOAFjAJYwPjHD3yZUTMOIqoj1oE8FW-P9H1rE0XzfddP1-f89N0YCgNdCz7nuWgTA6FRyF9TQdBsZYWlEQoIFYL90HYPkABJBFoUpAvBRgdEYe5nggMBHj2IA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXQBBHwCAGWTdVIxMxERGRpalAF9FCAArIhU0gGs4VlEK3Nt8-jgTKGFSNIJ+WlECNLGJ6dngaHg5zLkAXTdodDaVYvZakNzdAF4X8NxnviERUXeul+wjETwgdTqpBgaQ2BEYRFEonC9BEYIhEOoUHocGogIUYC88MR9ix8Twz3RUUBmTS0VIzA0aVEqDgBDR6IhmVOeg++L6zXx33BHLqohxrNIgLFIkZzNZ7JFdUx2NxvLAAXFGl0WhYtFJcEQgopioIJXGBDEgJ1jD1KLgmzNtAt51ywGAfKaArAl0uVVEgnoYslHzMFk01gu1WNit0tH4VPyAEIdehqBxKrGICUZMVRFVqEQJE7uOwAIxyKps-E+MJwQW6fEABQA8gE-AANDT1putjvUUj4uTDGPoxhwUiCRgQdjcl3hOTAONRS7DkdDIUj3TSiVwfh4gnNxwAOQcAE0jcKYzB1rQ4jz7E5nBuR0RGMsx3uPg4XM+YyZaFEu6AgAYvUzQBK4l4cqu6IVtGuisNSuS0lE9LqBscpVlB6JcrA94ev05LYRC25ah8pEYSyWGbsqOL7hqMqStatoiIaRGbqa5qWh8zH6g6XFzlAboEV6Pp+gGQaAqGlgRgsUbESKS5tCmcTprkVQ7BgqwaK++aFsW1BlkO8EimOE5TjOeGCQuS4riZELrvZoqauQn4Nuqzjthem7Xv2t4iCBYEQb+ir-oBbmgeBkExjBEKxauwzDLQJi6OwKjkAymg6DYtg1MKohlBArD1Og7BoKgAAkgi0FU5UVWKjA6IwwwDEoYADJcQA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } From 38eb4a5dabb866069295e51c67177dc2a92b000a Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Wed, 18 Jun 2025 15:46:41 +0200 Subject: [PATCH 11/38] use_evaluate WIP --- R/tm_a_pca.R | 9 ++-- R/tm_a_regression.R | 9 ++-- R/tm_g_association.R | 9 ++-- R/tm_g_bivariate.R | 3 +- R/tm_g_distribution.R | 14 ++---- R/tm_g_response.R | 3 +- R/tm_g_scatterplot.R | 7 ++- R/tm_g_scatterplotmatrix.R | 2 +- R/tm_missing_data.R | 98 ++++++++++++++++++-------------------- R/tm_outliers.R | 12 ++--- R/tm_t_crosstable.R | 3 +- R/utils.R | 9 ++-- 12 files changed, 76 insertions(+), 102 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index e5fb9c69c..717fbad1a 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -517,8 +517,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco quote({ tbl_importance <- dplyr::as_tibble(pca$importance, rownames = "Metric") tbl_importance - }), - keep_output = "tbl_importance" + }) ) teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Eigenvectors Table") @@ -528,8 +527,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco quote({ tbl_eigenvector <- dplyr::as_tibble(pca$rotation, rownames = "Variable") tbl_eigenvector - }), - keep_output = "tbl_eigenvector" + }) ) }) @@ -1044,8 +1042,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco decorators = select_decorators(decorators, obj_name), expr = reactive({ substitute(.plot, env = list(.plot = as.name(obj_name))) - }), - keep_output = obj_name + }) ) }, names(output_q), diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 7aa76e096..ddcc4e0c1 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -536,7 +536,7 @@ srv_a_regression <- function(id, teal.code::eval_code(quote({ fit_summary <- summary(fit) fit_summary - }), keep_output = "fit_summary") + })) teal.reporter::teal_card(anl_fit) <- append(teal.reporter::teal_card(anl_fit), "## Plot") anl_fit }) @@ -1000,8 +1000,7 @@ srv_a_regression <- function(id, "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot), - keep_output = "plot" + expr = quote(plot) ) fitted <- reactive({ @@ -1024,9 +1023,7 @@ srv_a_regression <- function(id, output$text <- renderText({ req(iv_r()$is_valid()) req(iv_out$is_valid()) - paste(utils::capture.output(summary(teal.code::dev_suppress(fitted())))[-1], - collapse = "\n" - ) + paste(utils::capture.output(summary(fitted()))[-1], collapse = "\n") }) # Render R code. diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 31a237b25..8472f4fe0 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -492,7 +492,7 @@ srv_tm_g_association <- function(id, ) ) } - obj <- merged$anl_q_r() + obj <- merged$anl_q_r() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "## Plot") teal.code::eval_code( obj, @@ -522,8 +522,7 @@ srv_tm_g_association <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot), - keep_output = "plot" + expr = quote(plot) ) plot_r <- reactive({ @@ -538,9 +537,7 @@ srv_tm_g_association <- function(id, width = plot_width ) - output$title <- renderText({ - teal.code::dev_suppress(output_q()[["title"]]) - }) + output$title <- renderText(output_q()[["title"]]) # Render R code. source_code_r <- reactive(teal.code::get_code(req(decorated_output_grob_q()))) diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 6fe4e44f7..d6891cb9b 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -728,8 +728,7 @@ srv_g_bivariate <- function(id, ) } print_call - }), - keep_output = "plot" + }) ) plot_r <- reactive(req(decorated_output_q_facets())[["plot"]]) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 15d4405c1..baffc12a4 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -637,7 +637,7 @@ srv_distribution <- function(id, obj <- merged$anl_q_r() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Distribution Plot", after = 0) - + ANL <- obj[["ANL"]] dist_var <- merge_vars()$dist_var s_var <- merge_vars()$s_var @@ -1297,32 +1297,28 @@ srv_distribution <- function(id, "d_density", data = output_dist_q, decorators = select_decorators(decorators, "histogram_plot"), - expr = quote(histogram_plot), - keep_output = "histogram_plot" + expr = quote(histogram_plot) ) decorated_output_qq_q <- srv_decorate_teal_data( "d_qq", data = output_qq_q, decorators = select_decorators(decorators, "qq_plot"), - expr = quote(qq_plot), - keep_output = "qq_plot" + expr = quote(qq_plot) ) decorated_output_summary_q <- srv_decorate_teal_data( "d_summary", data = output_summary_q, decorators = select_decorators(decorators, "summary_table"), - expr = quote(summary_table), - keep_output = "summary_table" + expr = quote(summary_table) ) decorated_output_test_q <- srv_decorate_teal_data( "d_test", data = output_test_q, decorators = select_decorators(decorators, "test_table"), - expr = quote(test_table), - keep_output = "test_table" + expr = quote(test_table) ) decorated_output_q <- reactive({ diff --git a/R/tm_g_response.R b/R/tm_g_response.R index c59e72b88..6c70e3550 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -576,8 +576,7 @@ srv_g_response <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot), - keep_output = "plot" + expr = quote(plot) ) plot_r <- reactive(req(decorated_output_plot_q())[["plot"]]) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 93b4a7991..cb0f8a3b1 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -372,7 +372,7 @@ ui_g_scatterplot <- function(id, ...) { DT::dataTableOutput(ns("data_table"), width = "100%") ), encoding = tags$div( - tags$label("Encodings", class = "text-primary"), + tags$label("Encodings", class = "text-primary"), teal.transform::datanames_input(args[c("x", "y", "color_by", "size_by", "row_facet", "col_facet")]), teal.transform::data_extract_ui( id = ns("x"), @@ -1020,8 +1020,7 @@ srv_g_scatterplot <- function(id, id = "decorator", data = output_q, decorators = select_decorators(decorators, "plot"), - expr = quote(plot), - keep_output = "plot" + expr = quote(plot) ) plot_r <- reactive(req(decorated_output_plot_q())[["plot"]]) @@ -1042,7 +1041,7 @@ srv_g_scatterplot <- function(id, validate(need(!input$add_density, "Brushing feature is currently not supported when plot has marginal density")) } - merged_data <- isolate(teal.code::dev_suppress(output_q()[["ANL"]])) + merged_data <- isolate(output_q()[["ANL"]]) brushed_df <- teal.widgets::clean_brushedPoints(merged_data, plot_brush) numeric_cols <- names(brushed_df)[ diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index c0a44e07e..0d2b3257a 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -392,7 +392,7 @@ srv_g_scatterplotmatrix <- function(id, # create plot teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Plot") - + if (add_cor) { shinyjs::show("cor_method") shinyjs::show("cor_use") diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index fcf8feae3..f0509e220 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -754,25 +754,25 @@ srv_missing_data <- function(id, env = list(data_keys = data_keys()) ) ) - + teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Plot") - + qenv <- teal.code::eval_code( qenv, substitute( expr = summary_plot_obs <- data_frame_call[, analysis_vars] %>% - dplyr::summarise_all(list(function(x) sum(is.na(x)))) %>% - tidyr::pivot_longer(dplyr::everything(), names_to = "col", values_to = "n_na") %>% - dplyr::mutate(n_not_na = nrow(ANL) - n_na) %>% - tidyr::pivot_longer(-col, names_to = "isna", values_to = "n") %>% - dplyr::mutate(isna = isna == "n_na", n_pct = n / nrow(ANL) * 100), - env = list(data_frame_call = if (!inherits(data_r(), "tbl_df")) { - quote(tibble::as_tibble(ANL)) - } else { - quote(ANL) - }) - ) - ) %>% + dplyr::summarise_all(list(function(x) sum(is.na(x)))) %>% + tidyr::pivot_longer(dplyr::everything(), names_to = "col", values_to = "n_na") %>% + dplyr::mutate(n_not_na = nrow(ANL) - n_na) %>% + tidyr::pivot_longer(-col, names_to = "isna", values_to = "n") %>% + dplyr::mutate(isna = isna == "n_na", n_pct = n / nrow(ANL) * 100), + env = list(data_frame_call = if (!inherits(data_r(), "tbl_df")) { + quote(tibble::as_tibble(ANL)) + } else { + quote(ANL) + }) + ) + ) %>% # x axis ordering according to number of missing values and alphabet teal.code::eval_code( quote( @@ -1112,7 +1112,7 @@ srv_missing_data <- function(id, qenv <- common_code_q() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Table") - + qenv <- if (!is.null(group_var)) { common_code_libraries_q <- teal.code::eval_code( qenv, @@ -1190,7 +1190,7 @@ srv_missing_data <- function(id, qenv <- common_code_q() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## By Subject Plot") - + qenv <- teal.code::eval_code( qenv, substitute( @@ -1244,40 +1244,40 @@ srv_missing_data <- function(id, env = list(hashing_function = hashing_function) ) ) - + qenv <- teal.code::eval_code( qenv, substitute( expr = { by_subject_plot <- ggplot2::ggplot(summary_plot_patients, ggplot2::aes( - x = factor(id, levels = order_subjects), - y = factor(col, levels = ordered_columns[["column"]]), - fill = isna - )) + - ggplot2::geom_raster() + - ggplot2::annotate( - "text", - x = length(order_subjects), - y = seq_len(nrow(ordered_columns)), - hjust = 1, - label = sprintf("%d [%.02f%%]", ordered_columns[["na_count"]], ordered_columns[["na_percent"]]) - ) + - ggplot2::scale_fill_manual( - name = "", - values = c("grey90", c(getOption("ggplot2.discrete.colour")[2], "#ff2951ff")[1]), - labels = c("Present", "Missing (at least one)") - ) + - labs + - ggthemes + - themes - }, - env = list( - labs = parsed_ggplot2_args$labs, - themes = parsed_ggplot2_args$theme, - ggthemes = parsed_ggplot2_args$ggtheme - ) + x = factor(id, levels = order_subjects), + y = factor(col, levels = ordered_columns[["column"]]), + fill = isna + )) + + ggplot2::geom_raster() + + ggplot2::annotate( + "text", + x = length(order_subjects), + y = seq_len(nrow(ordered_columns)), + hjust = 1, + label = sprintf("%d [%.02f%%]", ordered_columns[["na_count"]], ordered_columns[["na_percent"]]) + ) + + ggplot2::scale_fill_manual( + name = "", + values = c("grey90", c(getOption("ggplot2.discrete.colour")[2], "#ff2951ff")[1]), + labels = c("Present", "Missing (at least one)") + ) + + labs + + ggthemes + + themes + }, + env = list( + labs = parsed_ggplot2_args$labs, + themes = parsed_ggplot2_args$theme, + ggthemes = parsed_ggplot2_args$ggtheme ) ) + ) }) # Decorated outputs @@ -1289,8 +1289,7 @@ srv_missing_data <- function(id, decorators = select_decorators(decorators, "summary_plot"), expr = quote({ summary_plot - }), - keep_output = "summary_plot" + }) ) decorated_combination_plot_q <- srv_decorate_teal_data( @@ -1301,24 +1300,21 @@ srv_missing_data <- function(id, grid::grid.newpage() grid::grid.draw(combination_plot) combination_plot - }), - keep_output = "combination_plot" + }) ) decorated_summary_table_q <- srv_decorate_teal_data( id = "dec_summary_table", data = summary_table_q, decorators = select_decorators(decorators, "table"), - expr = quote(table), - keep_output = "table" + expr = quote(table) ) decorated_by_subject_plot_q <- srv_decorate_teal_data( id = "dec_by_subject_plot", data = by_subject_plot_q, decorators = select_decorators(decorators, "by_subject_plot"), - expr = quote(by_subject_plot), - keep_output = "by_subject_plot" + expr = quote(by_subject_plot) ) # Plots & tables reactives diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 0f2a53c65..b5e6a08e9 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -756,7 +756,7 @@ srv_outliers <- function(id, data, outlier_var, req(common_code_q()) qenv <- common_code_q() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Box Plot") - + ANL <- qenv[["ANL"]] ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] @@ -850,7 +850,7 @@ srv_outliers <- function(id, data, outlier_var, density_plot_q <- reactive({ qenv <- common_code_q() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Density Plot") - + ANL <- qenv[["ANL"]] ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] @@ -1043,8 +1043,7 @@ srv_outliers <- function(id, data, outlier_var, }, env = list(table_columns = input$table_ui_columns, .plot = as.name(obj_name)) ) - }), - keep_output = obj_name + }) ) }, stats::setNames(nm = c("box_plot", "density_plot", "cumulative_plot")), @@ -1057,8 +1056,7 @@ srv_outliers <- function(id, data, outlier_var, "d_table", data = decorated_final_q_no_table, decorators = select_decorators(decorators, "table"), - expr = quote(table), - keep_output = "table" + expr = quote(table) ) output$summary_table <- DT::renderDataTable( @@ -1330,6 +1328,6 @@ srv_outliers <- function(id, data, outlier_var, ) - decorated_final_q + decorated_final_q }) } diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 33ef48db0..958cd9b93 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -428,8 +428,7 @@ srv_t_crosstable <- function(id, data, label, x, y, basic_table_args, decorators id = "decorator", data = output_q, decorators = select_decorators(decorators, "table"), - expr = quote(table), - keep_output = "table" + expr = quote(table) ) output$title <- renderText(req(decorated_output_q())[["title"]]) diff --git a/R/utils.R b/R/utils.R index cbcab1ba3..aed4d4ed1 100644 --- a/R/utils.R +++ b/R/utils.R @@ -290,8 +290,6 @@ assert_single_selection <- function(x, #' @param expr (`reactive`) with expression to evaluate on the output of the #' decoration. It must be compatible with `code` argument of [teal.code::eval_code()]. #' Default is `NULL` which won't evaluate any appending code. -#' @param keep_output (`character`) optional, names of the outputs to keep. -#' Default is `NULL` which won't keep any outputs. #' @details #' `srv_decorate_teal_data` is a wrapper around `srv_transform_teal_data` that #' allows to decorate the data with additional expressions. @@ -299,7 +297,7 @@ assert_single_selection <- function(x, #' first. #' #' @keywords internal -srv_decorate_teal_data <- function(id, data, decorators, expr, keep_output = NULL) { +srv_decorate_teal_data <- function(id, data, decorators, expr) { checkmate::assert_class(data, classes = "reactive") checkmate::assert_list(decorators, "teal_transform_module") @@ -309,12 +307,11 @@ srv_decorate_teal_data <- function(id, data, decorators, expr, keep_output = NUL decorated_output <- srv_transform_teal_data("inner", data = data, transformators = decorators) reactive({ - req(data(), decorated_output()) + req(decorated_output()) if (no_expr) { decorated_output() } else { - req(expr()) - teal.code::eval_code(decorated_output(), expr(), keep_output = keep_output) + teal.code::eval_code(decorated_output(), expr) } }) }) From c8f488a328d66824b7248ff6124acb7ccfcd0508 Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Thu, 19 Jun 2025 08:31:08 +0200 Subject: [PATCH 12/38] WIP on use_evaluate --- R/tm_g_bivariate.R | 17 +++++++++-------- R/utils.R | 4 +++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index d6891cb9b..7e412305a 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -553,16 +553,17 @@ srv_g_bivariate <- function(id, selector_list = selector_list, datasets = data ) - qenv <- reactive({ - obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0) - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("teal.modules.general")') # nolint quotes - }) anl_merged_q <- reactive({ - req(anl_merged_input()) - qenv() %>% - teal.code::eval_code(as.expression(anl_merged_input()$expr)) + obj <- data() + teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0) + obj |> + teal.code::eval_code( + c( + expression(library(ggplot2), library(dplyr), library(teal.modules.general)), + as.expression(anl_merged_input()$expr) + ) + ) }) merged <- list( diff --git a/R/utils.R b/R/utils.R index aed4d4ed1..dc4e0571b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -306,12 +306,14 @@ srv_decorate_teal_data <- function(id, data, decorators, expr) { moduleServer(id, function(input, output, session) { decorated_output <- srv_transform_teal_data("inner", data = data, transformators = decorators) + expr_r <- if (is.reactive(expr)) expr else reactive(expr) + reactive({ req(decorated_output()) if (no_expr) { decorated_output() } else { - teal.code::eval_code(decorated_output(), expr) + teal.code::eval_code(decorated_output(), expr_r()) } }) }) From 3db8aaa9e48dd56bb84cdd63bde7ba3b9a2fe493 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:03:43 +0000 Subject: [PATCH 13/38] [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update --- man/srv_decorate_teal_data.Rd | 8 +------- man/tm_a_pca.Rd | 24 ++++-------------------- man/tm_a_regression.Rd | 24 ++++-------------------- man/tm_g_association.Rd | 24 ++++-------------------- man/tm_g_bivariate.Rd | 24 ++++-------------------- man/tm_g_distribution.Rd | 24 ++++-------------------- man/tm_g_response.Rd | 24 ++++-------------------- man/tm_g_scatterplot.Rd | 24 ++++-------------------- man/tm_g_scatterplotmatrix.Rd | 24 ++++-------------------- man/tm_missing_data.Rd | 26 +++++--------------------- man/tm_outliers.Rd | 24 ++++-------------------- man/tm_t_crosstable.Rd | 24 ++++-------------------- 12 files changed, 46 insertions(+), 228 deletions(-) diff --git a/man/srv_decorate_teal_data.Rd b/man/srv_decorate_teal_data.Rd index 370c32fa5..cc29a7be9 100644 --- a/man/srv_decorate_teal_data.Rd +++ b/man/srv_decorate_teal_data.Rd @@ -5,7 +5,7 @@ \alias{ui_decorate_teal_data} \title{Wrappers around \code{srv_transform_teal_data} that allows to decorate the data} \usage{ -srv_decorate_teal_data(id, data, decorators, expr, keep_output = NULL) +srv_decorate_teal_data(id, data, decorators, expr) ui_decorate_teal_data(id, decorators, ...) } @@ -17,12 +17,6 @@ ui_decorate_teal_data(id, decorators, ...) \item{expr}{(\code{reactive}) with expression to evaluate on the output of the decoration. It must be compatible with \code{code} argument of \code{\link[teal.code:eval_code]{teal.code::eval_code()}}. Default is \code{NULL} which won't evaluate any appending code.} - -\item{keep_output}{(\code{character} or \code{NULL}) Names of output objects in the environment -that are will be added in the card for the reporter. -These are shown in the card via the \code{\link[tools:toHTML]{tools::toHTML()}} and \code{\link[teal.reporter:to_rmd]{to_rmd()}} implementations.} - -\item{...}{(\code{\link{dots}}) additional arguments passed to future methods.} } \description{ Wrappers around \code{srv_transform_teal_data} that allows to decorate the data diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index 24f228782..0b53f4af6 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -122,22 +122,6 @@ For additional details and examples of decorators, refer to the vignette \code{vignette("decorate-module-output", package = "teal.modules.general")}. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example @@ -207,13 +191,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLqkQ11XfxQpFC6cAAesKgiSoHBBsZc1AD6sVA2MUEhRroA7rSkABYq7Km4uiBKurqMcACOgrQ17L6ipMTURIyKEFWOAMoAgow1raLxuv1DI6SiSgC+3UpoqOMq+eyVAZm6ALxbwbibfEIiY3vHwmIbPVW6pDBJUEmoBGmbt7oKYAAKAMIDX0ONw+sV2+ye4VIzA0SVEqDgBGuHxBmWg8DBX0mwzEM0B72RojgIg0YMJxNIsPhiPxyN0BAKRFoBDEYK0LFoUHoIiS9MZzNESNpyNSYNSwGAmMG2NGXwAurKytSwABZQSMfgyQGfMADUSiKDCUhazGMehQCDfIioY1gLBoOBfbpC25yIHOqpkhHkfhgpWq9WavDa3X6w2Ot3umCG2hRPR7BwuGkuiO0ky0ajkRhggByjgAMnmk06XZtut1aCZdOwVJn1JodDZbBUbqIihBWAN0OxlgASBplXuExg6LrzJRgOayoA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLoDCAEQCSAMreuvxQpFC6cAAesKgiSmERBsZc1AD6SVA2ieGRRroA7rSkABYq7Fm4uiBKurqMcACOgrSN7BBipMTURIyKEPUAgr6BADIpumkYWYiIjCPjSgC+AwBWRCrpANZwrKKVebYF-HAmUMKk6QT8tKIE6Rtbu-vA0PAHWXIAuu5oqJMVCV2HVQnldABeMERXCgvhCESiSG6eHCMQgwb1KYwdJQdKoAjZUFY3QKMAABW8QzJsMxJKSyKy6RipGYGnSolQcAIGJJ9Ly7z0ULJizGNOJfNEcBEGmRUplV053N5fJJBFKmwIYmRWhYtCg9BE1w1tC1BwlqvqWUZeWAwBFozFYG+32qPLJACEALJYADSWAAjDTSWAhgBxVx4EPOADygV8AE0yQNLVi5LTU-V5dzyPxke6wN6-YHgyKI8mM5mYJdaPEhfYnK46Xz0xasSZaNRyIxkQA5RxjMXN+optOggYDWgmXTsFTd9SaHQ2Wy1TGicoQVhDdDsf4AEla1X3UsYOn6KyUYGW3yAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index 1a6589f1d..37a215e71 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -147,22 +147,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example @@ -249,13 +233,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLqkQ11XfxQpFC6cAAesKgiSoHBBsZc1AD6sVA2MUEhRroA7rSkABYq7Km4uiBKurqMcACOgrQ17L6ipMTURIyKEFUAwgDyAEzxugODSgC+3UpoqCMq+eyVAZm6ALwrwbjLfEIiouu6u8JiSz1VuqQwSVBJNRI1oqJWEGcXF9RQ9HD+GwpgWDgDzEzxI-2253ej1QJFEeg2qSS4VIzA0SVEqDgBDe7wuqWg8EO-zG4OWuN0cJEGkOlKxpHRmOxZPJuk+31+un+AGUfnTdFoWLQviJEKTISyCAUiLQCGIiWBBKhggBrOBilkXWkaOD8eWKlVqvDM8kwYSaKLw3QAMQAggAZLnOCEaqomWhhHWHBwuY0XbrkuTO3H3R6iTqHRHI1H0jFYnHk-GwS3Eobqlla0g03lo2NM8Xktk-eU8qmZgWMIX0faio353GS6Wyg4bcuVkRJBsy06pYDAFPjMAAXUHZSZhBIBHBnLAdhqQXgZH+ckDvveGc9f3HFjTGtN1HNIi9Tidq4ubo9uo2todrjrVX9uIf9+W3W6tBMunYKnI0e0cBstgVOcohFBArA2ug7CzAAJA0ZQwXCjA6F0kxKGAEyDkAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0lA0g0JA1RKIrBB0ZjMdQoPQ4NQkQowFg4ASxMSSPSYRjyYTUCRRHpIZk0tFSMwNGlRKg4AQyeTMZk3vzdPSFqN2SDZbo+SINEitVLLhKpTKNXVKdTaZD6QEafrdFoWLQqSJEGrOSaCCUNgQxHSwAAhACyWAA0lgAIyuk2YvUaOD8X2BkPhyNR5EXWhxRUAMUGowCzg5qdMtCicaRDhc6tl-Q1ckLsvxhNEvSRguFooNkulVfJ8tgiuVI1VeB70ZtOshMc7RtH5LNNN91u1pDtDqdYhdI7dGo9Xp9kPtjEd9BEV09tG9H1ywGAg8WYC+Xyq3bAgwA4q48EqwPmABrs78sEGLxPzkOtZzHZcy0tV8PxTKMYHTTNyycAsILqEwS2g3QczzVxt0xGtqyrIj+n6WgTF0dgVHIDttDgGxbBqDFRDKCBWEGdB2DQVAABIWiqHjeL5RgdD6ZYlDAJYviAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index 4f3fe3298..9e651dc70 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -107,22 +107,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -212,13 +196,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlQDCAPIATHG6-QMVpuqkHaLD0PCi7ABitNTkjOy0og4upVpokRyjpZsYJpMdpe0StATc7ACMADJyL129g8BnGtMAusPU+2ohw+XymjFEP1KUHEBHyLEmMi6AF8ukp9sMVHl2OMUroALz+DK4cZ8IQiGYE0nCMTY7qVXSkGCJCSJaGiIgEWiBKwQWn0+nVEz4wlBRJhUjMDSJUSoOAEPn8+kpOZ6AkKMCjdXEumK3SiOAiDTC-WG0jS2Xy8a6yoA+gG4XqgDKBrlpF0e0YXPoIkQWqt1thRBuYmFHq9IkSgeDCxSwGA6s1YB+kN0lrAAAUAWQtbp1XZWLKc3nqoF4NmwC9tdb6SbXXB+A6M1nSH6ddaTLRQvXhYsAIKPR2uNv8t6KuRVxUeikiqBi0ISybmuUK3XK2Cq3Mawat6u1o0EvdmmXL-26232tVgZ2m90scNiX14U+KqMEEMEsNQb1wSP5INvmMMjjBNtyTFM00zKBy1KPMCzgIswDsEtGQoFsK3HZ9+UPbtLyQuBS1Qndq10GBhE0SIN22ZwJ2rDsuwbAk+wHIdq1HEd-VHLouloIUNlUSVNB0GxbHKOlREKCBWF7dB2H2AASeooXQOT9UYHROiUJElDAJEfiAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0hI0lBRKIiARaGErBB0ZjMQ0TEjMmloqRmBo0qJUHACBTKZjMm89JCFGAFqMBTCMVzdKI4CINEjJdLLqz2ZzxXVqFB6FKkQKAlL2aRdFoWCT6CJECKQSrdAQShsCGIkYbGMaRFcbbQ7fsLZaoVBgMABUKBV8vqLvZiOdrnAANEW6AVYQZeVx4ONgLwAeUcADkHABNWMBrAAWQLYACDkGdkGAEZS+WE1WAEylvx2OwAMWFKYFACEi1gANJYZtgfphuSh71yvVwfhasAJpPmsUqky0KKzpHtwajAKuFeUsdcideuqOxGQukMpkKtkRg-c3K8+eBvCnzHTmWQz+3pXvylqhq1Dzjq8oGka6oImab4PpS1q2vakKOs6cCughnqwVymR+gGIxdsGk5hhGZbRqWi7JlUAoZtmealoMxZ1hWVa1t2ZZMYMI6UWArYdl2XF9oOw4CkelonphdQ-pu-JgAJQ6cf+mIwBctBxHy9hOM4hGruuUm6Nuu77qJ74iboR79P0tA0uwKjkDe2hwDYtg1BiohlBArCDOg7BoKgAAkLRVD5vmSowOh9MsShgEsXxAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index 07aea2ef5..09fd2e2d2 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -154,22 +154,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -283,13 +267,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlQDCAPIATHH+GRgmzPDs-QNdAL5dSmiowyp57BUjsQC8m1C4G3xCIqK6O6QwiRKJ9NostIFw692VuqGnu4lhpMwaiaKocAITxeLxS0Hg7wUYGmUP2zxBojgIg070RyNIfwBQI2IMq1Cg9CRkLAAGUkYDSLotHcCSJELCcbiCPkiLQCGJ3tTGPd6CJEszWezRMUMsBgFCYWAALpSuRw3EvNEUuD8YnECwM+G4ky0UIq94AMQAggAZEmuLWVLoguWM1jvFKfULfdQY-6A4G4sGwPQ7CWDTUKpUonbBt1Yz0K-GEvx+0nklFcnl0wMK3QCtkcnZJ2lwfkszPClJi-0DKEy22WxUJ8iquOCVBBADWcFTCpgwk0kV9umNZuc8rTOr1dd7pvNjKtjMrIMYRGyiRM6jglJ2jq+P3DHsnu3BPdLber6NRNcx26reIJRLjZOPOd5cHpeB3lQzQs5NIf+cFYhFQRL0IBtKsqDkGNb6nGdisACh4gsOEFjv2O7Wi8M4vG0i7LquHwbq6Z7YlW3oQnGkqgUeFInui+GRri0bXroUK3hR94ps+F7pgW77Zp+fJvr+xbioBZbAWhYHoghUJ2NUgTwGQsEvPBo59hOVYoVOzxdF0tAmLo7AqOQm7aI8ci2OUzyiIUECsEa6DsEsAAk9SlA5iKMDonRKLMShgLMUpAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIZMYGkJGl6NoWLQwnBgQM6rookjMmloqRmBo0qJUHACHiCQTMm89JCFGAFqM2TD8QzRHARBokXyBZdqbT6QyCdQoPR+Ui2QF+bTSLotFiZSJEFyQZLdAQShsCGIkWrGNj6CIrgbaEaPrlgMA2Ry2V8vnJubq6sLlXB+PL2QBxVx4HWSky0KK+pEAMUGowCrh5BP6DPdodYxNypKi5PUoppdNDdSZsBZuidI05IaTXqVgsh3spYsLNalMrlrLAipFqvVFrgWurnr11ttJr7lv1hrEB3CDorizArrTrdrIqjnYTAA1tavdDALrQ4mXY-HnB7PeHI37IaeE0XdCnkxe6owiAU0mcjSrISSyRT83FB8S3gf1nSHSVGx-XQoKpAsJV1aVZWof1u2VXszQ1Add2HKcbWNSFTXNSdRxnTJ53ZSsXTdF9ILrcgb3LdksAAWRwy8Iw3XQ70TXUnzqFcGW6T91DgaC-xzAC4KA1sQLLBcq1otd0IbejpJbYckI7Ji0MFIisMHJSCTwsdCInOArWnO050dSjF2XIzlI0Li2S8AB5RwADkHAATXY3Ury4niH34x8QX6fpaBMXR2BUcgAO0XE5FsGp8VEMoIFYQZ0HYNBUAAEhaKo8vyvlGB0PpliUMAli+IA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index 8f2fc4e71..a064a26fe 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -116,22 +116,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -205,13 +189,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6urSMtKJxVTWiSgC+ihBKaKj1KnnsFf4ZugC8A0G4-XxCInUjdKKkfRCVlaQwiRLJtaQ19IKa1v3L-luJWizDo1CJYdvqpImiqHAEi0dHKdDwFwpg1bU-4yWb0qojgIg0F1B4Puj2e7DONSg9BEiQI+SItAIYj6v0aPzkpR+AAU4EEeAAZCgSAr4w7LNpHBm6NptWgmXTsFTkZiWHQ2WzlIGiQoQVgAQXQ7E6ABJBLRSjLQYwdIw2s0lGBmgBdIA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXQBBHwCAGWTdVIxMxERGRpalAF9FCAArIhU0gGs4VlEK3Nt8-jgTKGFSNIJ+WlECNLGJ6dngaHg5zLkAXTcILRZRAEY2ghLxgjE00TgRDTh+dlqujujFoUHoIk2r1o73OuWAwAUYD6zURl0uVQIAKRWAAsoiqoivAB5RwAOQcAE18bpEQFnAANRFyOS4QFfH7kfi6AC8ulJjmaKIgwyUaFQbRUxQBEDqmR5IVyrJluj4QhEonlquEYmldTqpBgaQkGR2pBB9EEmmsgL1IVNaWB8syaWiZvUG1EqDgmJttoV4VOel5iOR+N9tvZ3tI8sjGk+Xp9yr9epebzE8uBoPBcEhadh4XhIaaKLAaIxWPqAHFXHgaWAAEI4rAAaSwDyZLPDftjnPliMbLbbYaTyZV61ocSDugAYvVmnSlaO9SZaFE-vLZ-PXCPbcNk52d7pRG7wg6WE7ci6om6457vbrR5lA32kcXh0uV9RyIx5Z-v-H7y7W1gQ1XkQIeRclzHL8JxEeUHBcIDdD3P0D2TCRGCIQRUDPH9eWdV1mFvBMH2TJ9YCnIt+jwJC-xkX9aC-GQAMTKCgXuDN7ggpC6hgcdJ3gpxtyXFDd19FDhmGWgTF0dgVG-d1tDgGxbBqZVRDKCBWHqdB2DFAASQRaCqAyvkYHRGGGAYlDAAZLiAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index a2ea8ffb5..2a617112a 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -135,22 +135,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -239,13 +223,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlTCtLKJxur0E-RWmHbrsWroqugTsCoSs1Iuli1qiq7qLsFuLUiyLcrbl3ZVDfYyiwMBaALp3g1DiJuqkHezD-Tf3d12VAF8lACuko0KhBio8gszildABefwZXBjPhCEQDRFo4RiGHnXSkGCJCSJaqiVAkURwPH43TUKD0OB+RGLLBiCkQKm6AAK7VImzwY3xZI5XMRKUSYVIzA0iXJcHmQtpKWg8AR2zAXyuqyV+KpIg06v1CtIctQCpptPO9MZzI1AGUmSbdFoWLQGSJEDqzlbKgR8kRaAQxOrXYx3fQRIl-YHg6JihkbostQKHqVFUsVngNQdGEc5Cifb7jRo4Px1YsCMtvb7zjBhJpInpEQAxACCABl7c5C7XKiZaKEy+r213XEX8f9aQXdbpQuqJVKZab5YqJ+cVbBmxqUzXi07DYiSyvzWu+3SGUyK2BHQbSC63R64F7Bev8TGgyHEWGI1GP3GEyCJNNUuVM7nTBYwA2PYUBgfNez7Y9hxZKCBQQ2t62oRsRBHTtu3Q30ByHctWzw8daynSclSnLouloExJhUchl20aljjKMZREKCBWDbdB2HBAASepSiEqlGB0TpgSUMAATuIA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0hI0g1RKgSKI4OjMZjqFB6HBqEiFGAsGJCRBiboAAo9UiiOkwjFk-FMlmQzJpaKkZgaNIEuAEUlkzGZN56SF0hajbkguW6YkiDRI7XSy5SmUazW6ClUmnKsABakG3RaFi0SkiRDq3mmgglDYEMRIh2MJ30ERXL20H0fXLAYAqkZqsBfL5VY1gABCAFksABpLAAJm5ujpXgA8o4AHIOACadLkch5psx+o0cH4tNTGezebwJs1MAutDiSt0ADFBqMAs46-XTLQos2kSOx653WT+pra93dFEkcLReLDahpbLNQrYIOY4su8uG7bdZDG-vDxuyebqa2bTrSPbHc64K7L1PdE9b1fUhf1A2DICwzRTIo3POMEyTYFrWcAANfM6SwQYvFcMAa0net7znK1MOwt0AN7ahNAHedR3HfDTRMGciOHWil3rVc5Q4uoOP6fpaBMXR2BUcg920Eka2qEFRDKCBWEGdB2DQVAABIWiqJTlOJRgdD6ZYlDAJYviAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index 0bd884ff8..556c87b34 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -146,22 +146,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -333,13 +317,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQlQDCAPIATHG6-QNKAL5dSmiowyp57BX+GboAvMtBuEt8QiKia7o7wmKL3ZW6pDCJEomiBIHkjJFEpKfn59RQ9HB+6wpgAGV7qRHs9SCN8kRaAQxP8tmd3qEDilEmFSMwNLdUHACG93ucUtB4Ad-qM4Ut8bpRD8ceD1tSRJjRNjcRTKbpPt9frp-gCaRpdFoWLQviJEOSEeyCJDoWIDkLGCL6CJEtKoTDRMUMsBgKTBv8ALoG0qswgkAhwnlgQSoIIAazg-zkcnh7PODNpcH4JLNFglbsqMGEmkienWADEAIIAGQBzldAZMtFCXoOUdjrkl7y6lJdbMqrGRGVRoXR6lIWJxeMphNgYatZLw+fd-LpVNbldZWfxnJ+Pr5jPBCqVYv9AbVsv262HorgqplGq1QR1erGYCNJsWvoteCtNvtjrAzoTbo9GlTf2ttqgDrHbqD1BDIjTMbjJ-ZSZT3ojr8zbpz+J5t2bQdIk9CFusKJohiFbMlWzaVLWxKXo277vGebYYZ21bsr23K8q2grCrO4pNt27wThq8rEcqc6UScCH4ikK5gI2G6MRRW4AAqfGQlr-HYrDYvxYB2NUgTwHxu7-MQfrSVeB5OhxuhAQG7aDheugAHKONG0ZofiD5PvW6Zvspn6aaZf7sgB2YGaItAAF5zuBRZBCWZZMiyOHvEh9arne+IYQcWFwV2al4f2hEzrRpEGRRC5ytONEqvRmrMbqrH6uuxq6Kask7qU-z7jeh7HspGGacV163mRalGbQoYvhm8XnBZ366FZjG2ecqn4owRDZIkJjqHAbZQaWMHYYxfk+qhjHBfSHZhT5PZfH2l4DrSRGKiRgWUml1G7bR87qicGUBTlm7-DxUBSUVolCYeD1iXAEkUKQTp9aeraaTpemtYGwaNc+P4teZyaWb+3XNt95xtMNo3jcW0HltN5EbHddZzdlrWLeptLoxF634YC0UpXAcXKYdyXHaliXpdqmVsblpq3fdVqCcJ8mve9UnlRjlSVR1-36cpDVNWDZmC6YkMdV1GM9ZUPUAV0XS0CYujsCojzltocA2LY5RnKIhQQKwkboOwMwACT1KUtvUowOidBMShgOMBpAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGWTdVIxMxERGYbGlAF9+gCsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI09c2dveBoeH3MuQBdN2h0CZUxXYtRCuV0AF5QeFcCC+EIRKIIbo4cIxMCBnVJjA0hI0ncwuRGHEiKR0ZjMdQoPQ4NQkQowAECASZMTSN4ShsCGJ6TCMeSokjMmloqRmBo8ag4AQyeTMZk3npIfSFqMeSDZbpRDSpWzIVqROLRJLpeqNbpKdTaUqGdqNLotCxaFSRIg1XyzQQObQuYjIQ7GE76CIrl6fQdwsBgMqRqqwF8vlUTWBBgBxVx4XT0gBCAFksABpLAARh5mbAuYLWAATPS5HJeWbMfqdXB+HTk2m3Y26jALrQ4ordAAxQajALOBvdky0KKtpEjseud3k-oa+umuqsQW5YVRUXqS5GqUyjXy2CD6OLPAbpu23Wau8S4838kWmntgJ3+2O51wV3X5dZU9TkxCRf1A2DYDvTRTJI0vWN40TYEO3TKpszzQsSwzdDKxrMA60nRtmw0OdrQrTCu27XtqE0Ad51HcdCLNadZzbSEF3HF9dFXWV10A7pejSegt0hIURTFQ9jRPWUz3gdsVUojViPvZSnxNQDXypd9rU-A02XA39-yYjUoJ9MCfyDOAQxA-YuPJWCo2TGN6UQuzMSTVNULLcji1LHDCzwtCwCwQYvC8+ksGcFM-AAeQAOSwnjGz47sHz00jdDixxRlGYzZWo2iRHoxc8vJFiMo4pdkpvFLZVEWgAC8rOE7dwl3fdDSkrjZIvJyr1KtKdSRVSj3U1K3ytMtdKGgzLKMtzTNAv0LMg0MYNyOC+oQhNdA8ztsPLDDfPw2qiLvDLlX2gaez7Oj2IYic3PKtjhweriksxU7MUYIgCjSM4uXvMS9wktTpPs3IFXk5yALOvThsfUbwdlCaPy-WaXUUj01t9b8A1-azoI+DbHIUuMdqTHzArLEKwr84KotihLay+pTzperKcuu5FbqK+6SqemcKrejTuJqvLun+9Q4CBndxIPMHush89of6rjlIRvTFdFupUZ09GVr-LGTJx8z8cswmwwc+CXIp5Cqfp2nwoZ6L4sS1m6vZpFOdytyCv7PnXoFnXTCFl7KvemrTR4-p+loExdHYFRCQPbQ4BsWwagxUQyggVhBnQdg0FQAASFoqmLkutUYHQ+mWJQwCWL4gA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index 02c88b26d..f90d7cf52 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -86,22 +86,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -241,13 +225,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6usTmpIy0YnH+GRgmzPDsFZW6tPy6ALxVHWAAIq54ugpgAGJYk6WTAJJ2cxNgzgDKK5MACsvjkwDis-tgAHIAMltgAEJj82DnjlcAgntyuJ2VEkQ6jBDwZH6pnUpCIjA6EC6XQI7AATKV4bpEQBGBFo3SojGlTGw96fLrUKD0ODUURAmGTACyJBYBHyrCuWDgqEE9DoBEmikhXTx3MqhIgEkEUCkiRMsFo1FYQPFGjBEKhlRhmIAzKU1boNRqUdj1djeYrdITiaTyUMDjIYFBlByTgAJEkiG2MohWixwTn4g1dVBEFmEzQkM0ADg1ADYAOylMMABlKABYoxi4xjMcik8jMTGMGHSgBOb2VFhwYIDGEqgCsSYrFdVMcxFZjFfzKJViPjdYROdKocLXn4qDNKow8a7SdhGDTI9K2Y12cR2aT2ebumzWZHff4cHopDNE5xGG106R3ZPR9HZ67F4n565lTvulE3AaWRSLTacAVXR6QORiEbHx8lURA1GwiQ-gMT4wJEn74kqQyjFcMxXEsVwbFcuxXEcVwXFctxXI8LxvIBhqiLQABeegDABcG6IwzKEgQVH2E4rhAX2rAlowQKiGCpDsFBMFwvWMaILCMbiaUAF0Qx6jMQ4LhyH2OgQIIzGCSI7AUmAohWtQ1BXPA-C0IIMBXISjBSFcJB0D4nJSSm9GRHJQIKc4fYENaTH6XAvSQREmkwm5pRTM85zrO5DmlE5jHyaxfYAI7CmQeTSgMfxgjA7DSciMYpuJHlEKIpBkulECZdlKbBvlMZ9qgjBECYeRAhljBZdJknJg+XIAL5cgAVkQKiJAA1nArCiMUGS2Fkg3DWNE1fnNECjeNQzVGQdRiFcG21PUohXD09mdMtq0cJMT4iAdJyXdtJxHWA3qnQt60gZt+1XLd12lNpD1ApMu1gQ9SlKFyShoIOWQqHkX4pECJSdHwQhXUCSPCGIX6VKQMCJBIiSiJ5pDkIwkRENjgR1KEmMEkSJL-WA6yE8TpO7lae2hHMtFaCwtBEijAx0MV1NQikiRhLUIL46gcAUkBhopNA8D04DH14LRUKiCSMu7pBWsaFLMvC4aRq034AyTOseu7tzdR82IiCc3Lxt0kNTGlboNu82ycCJC7tBu1NQTAMAANvXtd0ALoR32xuPlbvlmpMxZQFcEgDlcW47sdTuGjAwiaDBrmsSRsddGCW70X5LEuCXpemLQoQJwMoXhWxdcPoaMddKL4vMProjS7LdcK7AzEXc+33q10TXUMTMqSsTBtD3XJsmvTlsiBoHs83bDtqznio2+7oegaw4H8I7K9VPkrsNAM3PUGpvs3-7GMpMH49XZMUf3IDZ-A7XUumtN7kCrtpRCJxkInFQicTCJxsInFwicfCJxCInFeNnK+edZ60ELgMNyU97yANIlbHiVsl5G0NMaOm5sGakM9nbUQe9iHOxfm7IEDDvbP1vpNd+IcdIT2-hHH6QwkrWk0KQBkJxiDFW+qseqjU8ici7iQkBTdBiTDESlSRO0iolSuAopqpBMEr2wQXEQRca6ELLowCu6jgrWMqE1RuVcW4RWsR3RUnj7xek6FyLktATC6HYCoYmIJtCfiUmUToohCgQFYM8dA7AIYABJBC0FKKkzWjBfi9SUGAHqEcgA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXQBBHwCAGWTdVIxMxERGRpbahp8sALaOrp7G4aUAX0UIACsiFTSAazhWUQrc23z+OBMoYVI0gn5aUQI0xeW1jeBoeE3MuQBdN2h0NpVi9gHM3QAvCFcrgBnwhCJRIDdODhGJfhA6nVSDA0hI0hcwuRGHEiCiwoxaFEEUikdQoPQ4NRoQowAECFiZLjSDCCUTaaDEaTdFoWLQKZDoXRRKQSdy6pk0tFSMwNBjUHACGLxRLcg89EDaX1mhyBirdKIqYqWUDDSI5aIFUq9frdOTKdTNXSjRoeXyBWJELqubbdAQSksCGJobzCR6TgHaEGnrlgMAtU0dWAXi85JzfXUzca4PxodawPUAOKuPC6WlYepeEtVWkBZwADVpaZt+pgR1ocQ19icznTGaIjD2jBz0IcLj7vpMRJHQIAYvVmnWW9y5vrmz7uZLpbLjpbFcqVZl1TSC0MAt7J7RqNjoVPrzJ5fvl+L7VSTwEXSyKPxUEsyKIvTwZ9uVDKEgXzAAFeoKwAWV8DkywLAA1QI-DsJsJ1tf1A2DIFeWoQQ4AjHCY3COMEymZMXiqSDoPqOCfAQrUUICNCML9X4wCg2CmOQ1D0LAOR1wzA1PxnRC-AAOSQ5w7F0YxnEknxdAAeVnXQpJ8RwvDsPwVMki8Mzba8OxEUce2AuphNtLNXVNT9H2tDd9VfR1EI-c0WVDfl6EhQDMP1bCo1wt0w18oigujLYyPjU9KJTazfVs8hc3Azii2rRD6iQhdeMaABNDDLKRYzNE7czx2KuoByHcSx17KrTGnVLdHnRdXGcldgNXLqNx6uY5loExdHYFRsXUTQdBsWwai5UQyggVh6nQdg0FQAASQRaCqNb1sNRgdEYOZpiUMBpheIA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 76517facf..04fca9147 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -82,7 +82,7 @@ adaptable for general data analysis purposes. This module generates the following objects, which can be modified in place using decorators: \itemize{ -\item \code{summary_plot} (\code{grob} created with \code{\link[ggplot2:ggplotGrob]{ggplot2::ggplotGrob()}}) +\item \code{summary_plot} (\code{ggplot}) \item \code{combination_plot} (\code{grob} created with \code{\link[ggplot2:ggplotGrob]{ggplot2::ggplotGrob()}}) \item \code{by_subject_plot} (\code{ggplot}) \item \code{table} (\code{datatables} created with \code{\link[DT:datatable]{DT::datatable()}}) @@ -110,22 +110,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general example data data <- teal_data() @@ -180,13 +164,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrquuAAesKgiuvxQpFBK4ZEGxlzUAPoxUDbREVBxugDutKQAFirsKbi6IEq6uoxwAI6CtNXsPqKkxNREjIoQFbpQ-PyJ0KJZZhaa1gG25RCVlQHAosEi7KK1idwkEuyTpSbtHewiEBIF27YAVFXmtCbsAIylGAAMAKyPdwDsct8AulkAcgBBHpzHoAXzcM10DVowyM0MYsJ6MFaLDhxhRBDRkMqMNEwD+8OoaBCHDxpT6AyGXUqmLRBKyxPQ1A4dMYogp-UGUFENN0bPxwAUhFY1GFP0Jxh5GBM6lIBwFwCFIrFYAlfMVyqkLHFkt64llGgVqPZSuF2sYuq6YK6ShJWRUeXYPRSugAvGEMrhkQJhGJ3fzfSJRM6oZVSDBEjBYaIVBJkhl2KgWBRSAnItB4AHhQLhXyul0brp2CpyMxLDobFMeqJChBWID0OwSQASeoU9At1aMHSdJQQiBgME-IA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dOAAPWFQRXX4oUiglGLiDYy5qAH1EqBsE2Khk3QB3WlIACxV2TNxdECVdXUY4AEdBWgb2CDFSYmoiRkUIOoBBHwCAGXzUjEzEREZhsdrdYawA-LmfFaUAX36AKyIVNIBrOFZRCtzbI2i4EyhhUjSCflpRAjT9w5Oz4Gh4c8ycgAum5oOh8ipiuxFpldABeaK5XCLPhCESieG6VHCMTQgZ1XSkGBpGCvUQqCQZXLZfH9fq0Ey6dgqcjMSw6Gy2Gr40RlCCsQbodhoVAAEhaVRFotEMh0fW2SjAWyBQA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index f6dfecb3c..f8c15278d 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -100,22 +100,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example @@ -214,13 +198,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLqkQ11XfxQpFC6cAAesKgiSoHBBsZc1AD6sVA2MUEhRroA7rSkABYq7Km4uiBKuroAwgDyAEzxNQ2VzfXAwApgqIy0MCysSQDWcKxdALrjTaJwAI5JIhDsEIxEOex19XKKEAC+OwBWRCrDo6IlmbbZRycjrOc3EKccXZtdZa8teLpdPX0Dzy623cWhYoiaBAKxwIYiSMxEGjg-HYoN6UHoIiSkOhYguwQ6n3qE3GZQI7C6AAVqFAyO8fmA7KxUHA6V07Iw4EF4LSwNsdko0Kgmip8uSIFVUroALwBTK4Vp8IQicEyxXCXGtKqkGBJIiCUh0GTnTVVXR6g20GRJVHS3R0USkMWm52y4JJcKkZgaOHMskml2ummwPQywnvf0u+FwDS2qPe0S+p0Bl3U+hwfyhsAAZXT0dIulRtHRIkQ4fFyed2NoMJVBZYRYxcCxUOruNSBLAbzAk1J5MIJAIrLAglQwRGQLk8vLFaqcfI-FtXRHY5ZeAjAZgwk0URDugAYgBBAAyWecU5nppMtDCSNth5PrmnyZ2FZfLsnEYIQTgEiIvS-yQ2jK9qOuugbumEnrqKQPrRkmFapNA8CLp2XznjOV7UOQjC2ph2GwX6T4VqitYkehF5VjWtqgtQghNpRbaZB2XY9nWjCiAAJHOSIfkRybcQuMo0XRzY4uc7adKhRLdiSbGcQJvEXlUm5YbQO62g4LhgVUb4Brppr6W+Ow7LQJi6OwKjYdB2hwDYtgVOWohFBArAHug7CChxgi0GUnkzIwOiMDsuxKGAuzjEAA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokrcQAxLoDCAEQCSAMreuvxQpFC6cAAesKgiSmERBsZc1AD6SVA2ieGRRroA7rSkABYq7Fm4uiBKuroAgr6BADIpumkYWYiIjE2tSgC+ihAAVkQq6QDWcKyilXm2BfxwJlDCpOkE-LSiBOnjkzNzwNDw81lyALruaxrpWiyi6VD8otTtZ2LsAGK01ORGOxdg4XNVRGh4hwssBgAowP0WvCrldqrsMHdSERGHJcUpHoxRO0CKUJgQxOlRHARBo4Px2ATaFB6CItqTaOSLnlYfDEcjUaZ1JsCc9Xu88RB3EpIe0VCV2HVQnldABeJURXCKvhCEREtXa4TfRX1UgwdJEQSkOgyebG+q6C1W2gyB4sVW6OiiUgKiD2v3qqDpGKkZj3USoOAEH3+-1ZL7u3nNJF4O0xqk00ju9ORzbhyPRmP+6jM6kJsCBak53SM5kiRDwzW+wt+klksTumssuBsttciI8hFJ-nVKO8gDirjwunhACEALJYADSWAAjPDcY3m37s7T+GWGhOG6nCzANrR4no1T8Gi1As5N1v6iZaNE6e7r7fXE3myMf8e5A+LbhHAEjYhy3Cuow7qet6x71FkQbRCGQqUhGo7foWcawJe06DgMKYYTGz4AjI7rEYCqH5nB-oih2TyAVurYcu2aqPNQgjdkxnILP2cJ4cmKLVCKAAkO7kPwAHUdula7nR7Gcey3EwnxfJgIJ1ZPKJMniZJhEnmeF7uqCX6Pr+hZmX6Fm6GZIwjLQJi6MCqihpoOg2LYtRNqI5QQKwDToOwkLCYItDVEFVKMDoOJDEoYCDFcQA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index bc90e89e7..c761018da 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -100,22 +100,6 @@ To learn more please refer to the vignette \code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } -\section{Reporting}{ - - - -This module returns an object of class \code{teal_module}, that contains a \code{server} function. -Since the server function returns a \code{teal_report} object, this makes this module reportable, which means that -the reporting functionality will be turned on automatically by the \code{teal} framework. - -For more information on reporting in \code{teal}, see the vignettes: -\itemize{ -\item \code{vignette("managing-reproducible-report-documents-in-teal", package = "teal")} -\item \code{vignette("adding-support-for-reporting-to-custom-modules", package = "teal")} -} - -} - \examples{ # general data example data <- teal_data() @@ -212,13 +196,13 @@ if (interactive()) { \describe{ \item{example-1}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXVIhrqu-lCkULpwAB6wqCJKAUEGxlzUAPoxUDbRgcFGugDutKQAFirsKbi6IEq6ujCkBCyicVU1dRWmRIy67Fq6KroE7AqErNQDpQNaoiO6A7CTA1IsA3K25RCVldW1jKLAwFoAunsNUOIm6qRt7Bt1O-t7iqu6AL4tV1s7A6iMtDAsrIkA1nBWAMDg1RHAAI6JEQQdgQRhEbKXJpbJZKR73ABWRBUAKBomKGVsWWxuMBrAJpIgeI4A1eEzwUzA9NmYE+31+NMW9yUaFQDRUeX6DxSugAvP4MrgXgJhGJxVVZSICS1KqQYIlSIkCAjRKIgvQRMK1mtqFB6HA-BKBgBhXX1OzmqJ4VVrUIKlKJMKkZgaRKiVBwPquk0paDwBV0lEM6UPE2VcEiDQKxNBrUBoPG+Mms0Wq1MgDKlrTui0LFoTrgiBGIfjBHyOII8olZa+le1DdoTYJKXezOjIL2pWDg2GjLGMaZM3HYHmjG5sezJtTGjg-AVI4IQ1Zc8Wi6X62EmkieglDhc+4PbX4MjXCvPzkvS5MtFCd4lADEAIIAGQLrjjeN7mzOQn0qVgPQyL1Qh9M5-UDYNANDDJw1PJkWRdJC1hXUgU2LP0M0Qg9KlzS1IzAIsk1w1sK0NKsaywk160bZtS3LdtmK7MRCSCPsMIOYd+lHVlxlZadRlnOAFjAJYwPjHD3yZUTMOIqoj1oE8FW-P9H1rE0XzfddP1-f89N0YCgNdCz7nuWgTA6FRyF9TQdBsZYWlEQoIFYL90HYPkABJBFoUpAvBRgdEYe5nggMBHj2IA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } \item{example-2}{ \href{https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqajGIgEwCu1OAGcMAcwpxm1AJQAdCLTIyoBUrQBucAAQAeALS6AZoIgbaJdnN0AVLAFUAokqUBiXQGEAIgEkAZS9dfihSKF04AA9YVBElUPCDYy5qAH1EqBsEsIijXQB3WlIACxV2TNxdECVdXQBBHwCAGWTdVIxMxERGRpalAF9FCAArIhU0gGs4VlEK3Nt8-jgTKGFSNIJ+WlECNLGJ6dngaHg5zLkAXTdodDaVYvZakNzdAF4X8NxnviERUXeul+wjETwgdTqpBgaQ2BEYRFEonC9BEYIhEOoUHocGogIUYC88MR9ix8Twz3RUUBmTS0VIzA0aVEqDgBDR6IhmVOeg++L6zXx33BHLqohxrNIgLFIkZzNZ7JFdUx2NxvLAAXFGl0WhYtFJcEQgopioIJXGBDEgJ1jD1KLgmzNtAt51ywGAfKaArAl0uVVEgnoYslHzMFk01gu1WNit0tH4VPyAEIdehqBxKrGICUZMVRFVqEQJE7uOwAIxyKps-E+MJwQW6fEABQA8gE-AANDT1putjvUUj4uTDGPoxhwUiCRgQdjcl3hOTAONRS7DkdDIUj3TSiVwfh4gnNxwAOQcAE0jcKYzB1rQ4jz7E5nBuR0RGMsx3uPg4XM+YyZaFEu6AgAYvUzQBK4l4cqu6IVtGuisNSuS0lE9LqBscpVlB6JcrA94ev05LYRC25ah8pEYSyWGbsqOL7hqMqStatoiIaRGbqa5qWh8zH6g6XFzlAboEV6Pp+gGQaAqGlgRgsUbESKS5tCmcTprkVQ7BgqwaK++aFsW1BlkO8EimOE5TjOeGCQuS4riZELrvZoqauQn4Nuqzjthem7Xv2t4iCBYEQb+ir-oBbmgeBkExjBEKxauwzDLQJi6OwKjkAymg6DYtg1MKohlBArD1Og7BoKgAAkgi0FU5UVWKjA6IwwwDEoYADJcQA}{Open in Shinylive} - \if{html}{\out{}} - \if{html}{\out{}} + \if{html}{\out{}} + \if{html}{\out{}} } } } From 1384b90574d077587321a41943f34683404df743 Mon Sep 17 00:00:00 2001 From: Dawid Kaledkowski Date: Wed, 2 Jul 2025 07:28:16 +0200 Subject: [PATCH 14/38] remotes --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 60d78de8d..3412714a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -85,10 +85,10 @@ VignetteBuilder: rmarkdown Remotes: insightsengineering/teal.logger@main, - insightsengineering/teal.reporter@main, + insightsengineering/teal.reporter@teal_reportable, insightsengineering/teal.transform@main, insightsengineering/teal.widgets@main, - insightsengineering/teal@main + insightsengineering/teal@teal_reportable, Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2, rstudio/shiny, insightsengineering/teal, insightsengineering/teal.slice, insightsengineering/teal.transform, From 0ef73eb2751be1506c6b455843de25d2b48af685 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 05:34:33 +0000 Subject: [PATCH 15/38] [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update --- man/srv_decorate_teal_data.Rd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/srv_decorate_teal_data.Rd b/man/srv_decorate_teal_data.Rd index cc29a7be9..d5321072e 100644 --- a/man/srv_decorate_teal_data.Rd +++ b/man/srv_decorate_teal_data.Rd @@ -17,6 +17,8 @@ ui_decorate_teal_data(id, decorators, ...) \item{expr}{(\code{reactive}) with expression to evaluate on the output of the decoration. It must be compatible with \code{code} argument of \code{\link[teal.code:eval_code]{teal.code::eval_code()}}. Default is \code{NULL} which won't evaluate any appending code.} + +\item{...}{(\code{\link{dots}}) additional arguments passed to future methods.} } \description{ Wrappers around \code{srv_transform_teal_data} that allows to decorate the data From c0a28800b778f3e5a11eef0e599247f279335d03 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 2 Jul 2025 09:13:49 +0200 Subject: [PATCH 16/38] missing prefixes --- R/tm_a_pca.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 717fbad1a..71a3f1d09 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -738,7 +738,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco size <- input$size font_size <- input$font_size - teal_card(base_q) <- append(teal_card(base_q), "## Biplot") + teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Biplot") qenv <- teal.code::eval_code( qenv, substitute( @@ -999,7 +999,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco parsed_ggplot2_args$theme ) - teal_card(base_q) <- append(teal_card(base_q), "## Eigenvector plot") + teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Eigenvector plot") teal.code::eval_code( base_q, substitute( From d61561fcfd0d5291e95e138b2f4a5df7ff688ced Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 2 Jul 2025 09:21:48 +0200 Subject: [PATCH 17/38] bring back sentence in tm_a_pca --- R/tm_a_pca.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 71a3f1d09..8cbaf85ee 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -44,6 +44,9 @@ #' For additional details and examples of decorators, refer to the vignette #' `vignette("decorate-module-output", package = "teal.modules.general")`. #' +#' To learn more please refer to the vignette +#' `vignette("transform-module-output", package = "teal")` or the [`teal::teal_transform_module()`] documentation. +#' #' @inheritSection teal::example_module Reporting #' #' @examplesShinylive From 6773637813a84d98a3cd3b4a88703e00bb869ace Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 07:29:09 +0000 Subject: [PATCH 18/38] [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update --- man/tm_a_pca.Rd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index 0b53f4af6..2fdfdf650 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -120,6 +120,9 @@ See code snippet below: For additional details and examples of decorators, refer to the vignette \code{vignette("decorate-module-output", package = "teal.modules.general")}. + +To learn more please refer to the vignette +\code{vignette("transform-module-output", package = "teal")} or the \code{\link[teal:teal_transform_module]{teal::teal_transform_module()}} documentation. } \examples{ From 0f744477fe7f4791468000b37224015c2051bbd2 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 2 Jul 2025 13:19:35 +0200 Subject: [PATCH 19/38] add Module's code section header to divide code preparation with data filtering with module's code --- R/tm_a_pca.R | 1 + R/tm_a_regression.R | 1 + R/tm_g_association.R | 1 + R/tm_g_bivariate.R | 3 ++- R/tm_g_distribution.R | 1 + R/tm_g_response.R | 1 + R/tm_g_scatterplot.R | 1 + R/tm_g_scatterplotmatrix.R | 1 + R/tm_missing_data.R | 1 + R/tm_outliers.R | 1 + R/tm_t_crosstable.R | 1 + 11 files changed, 12 insertions(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 8cbaf85ee..b2e3af947 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -436,6 +436,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes }) anl_merged_q <- reactive({ diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index ddcc4e0c1..6e88de6cb 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -460,6 +460,7 @@ srv_a_regression <- function(id, qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Linear Regression Plot", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 8472f4fe0..0f0f03d49 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -344,6 +344,7 @@ srv_tm_g_association <- function(id, qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Association Plot", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes }) anl_merged_q <- reactive({ diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 7e412305a..ebc552374 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -557,7 +557,8 @@ srv_g_bivariate <- function(id, anl_merged_q <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0) - obj |> + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + obj %>% teal.code::eval_code( c( expression(library(ggplot2), library(dplyr), library(teal.modules.general)), diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index baffc12a4..ad71879fc 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -637,6 +637,7 @@ srv_distribution <- function(id, obj <- merged$anl_q_r() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Distribution Plot", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") ANL <- obj[["ANL"]] dist_var <- merge_vars()$dist_var diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 6c70e3550..22a5fa845 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -409,6 +409,7 @@ srv_g_response <- function(id, qenv <- merged$anl_q_r() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Response Plot", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") ANL <- qenv[["ANL"]] resp_var <- as.vector(merged$anl_input_r()$columns_source$response) x <- as.vector(merged$anl_input_r()$columns_source$x) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index cb0f8a3b1..8affcd0f5 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -587,6 +587,7 @@ srv_g_scatterplot <- function(id, qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 0d2b3257a..56eed5c4d 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -330,6 +330,7 @@ srv_g_scatterplotmatrix <- function(id, req(anl_merged_input()) obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot Matrix", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") qenv <- teal.code::eval_code(obj, 'library("dplyr");library("lattice")') # nolint: quotes. teal.code::eval_code(qenv, as.expression(anl_merged_input()$expr)) }) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index f0509e220..a45f5364c 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -528,6 +528,7 @@ srv_missing_data <- function(id, anl <- data_r() obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Missing Data", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") qenv <- teal.code::eval_code(obj, { 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes diff --git a/R/tm_outliers.R b/R/tm_outliers.R index b5e6a08e9..f0b2ed574 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -474,6 +474,7 @@ srv_outliers <- function(id, data, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 958cd9b93..bde874191 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -315,6 +315,7 @@ srv_t_crosstable <- function(id, data, label, x, y, basic_table_args, decorators qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Cross Table", after = 0) + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")') # nolint quotes }) anl_merged_q <- reactive({ From 630204be29b83aa309068b8b1a8681c2cf2148f7 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 2 Jul 2025 13:42:39 +0200 Subject: [PATCH 20/38] change moment where datatable is created for tm_missing_data --- R/tm_missing_data.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index a45f5364c..d00c2efea 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -1157,7 +1157,7 @@ srv_missing_data <- function(id, ) } - within(qenv, table <- DT::datatable(summary_data)) + within(qenv, table <- summary_data) }) by_subject_plot_q <- reactive({ @@ -1339,7 +1339,7 @@ srv_missing_data <- function(id, options = list(language = list(zeroRecords = "No variable selected."), pageLength = input$levels_table_rows) ) } else { - decorated_summary_table_q()[["table"]] + DT::datatable(decorated_summary_table_q()[["table"]]) } }) From e3b5a0bf8daa9fb858767636f54e6ae91186b1a4 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:43:28 +0200 Subject: [PATCH 21/38] Update R/tm_outliers.R Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> --- R/tm_outliers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_outliers.R b/R/tm_outliers.R index f0b2ed574..ebf67c1f2 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -474,7 +474,7 @@ srv_outliers <- function(id, data, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "# Module's code") outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) From fdd9f89a5fbc7bbac664c07fd9c854796dd3a4e6 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 2 Jul 2025 14:41:42 +0200 Subject: [PATCH 22/38] do not reshape data into DT in tm_outliers - only do that for printing modules results --- R/tm_outliers.R | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/R/tm_outliers.R b/R/tm_outliers.R index f0b2ed574..188940acc 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -474,7 +474,7 @@ srv_outliers <- function(id, data, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "# Module's code") outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -733,14 +733,7 @@ srv_outliers <- function(id, data, outlier_var, # Generate decoratable object from data qenv <- within(qenv, { - table <- DT::datatable( - summary_table, - options = list( - dom = "t", - autoWidth = TRUE, - columnDefs = list(list(width = "200px", targets = "_all")) - ) - ) + table <- summary_table }) if (length(categorical_var) > 0 && nrow(qenv[["ANL_OUTLIER"]]) > 0) { @@ -1065,7 +1058,14 @@ srv_outliers <- function(id, data, outlier_var, if (iv_r()$is_valid()) { categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) if (!is.null(categorical_var)) { - decorated_final_q()[["table"]] + DT::datatable( + decorated_final_q()[["table"]], + options = list( + dom = "t", + autoWidth = TRUE, + columnDefs = list(list(width = "200px", targets = "_all")) + ) + ) } } } From 9b324b08c03723fa7e703dfec2049de17680f6a5 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 2 Jul 2025 15:00:57 +0200 Subject: [PATCH 23/38] make Module's code section with two ## - so it's h2 instead of h1 --- R/tm_a_pca.R | 2 +- R/tm_a_regression.R | 2 +- R/tm_g_association.R | 2 +- R/tm_g_bivariate.R | 2 +- R/tm_g_distribution.R | 2 +- R/tm_g_response.R | 2 +- R/tm_g_scatterplot.R | 2 +- R/tm_g_scatterplotmatrix.R | 2 +- R/tm_missing_data.R | 2 +- R/tm_outliers.R | 2 +- R/tm_t_crosstable.R | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index b2e3af947..fe783d8ff 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -436,7 +436,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes }) anl_merged_q <- reactive({ diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 6e88de6cb..3e828408a 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -460,7 +460,7 @@ srv_a_regression <- function(id, qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Linear Regression Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 0f0f03d49..cbaf26b59 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -344,7 +344,7 @@ srv_tm_g_association <- function(id, qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Association Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes }) anl_merged_q <- reactive({ diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index ebc552374..33d246100 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -557,7 +557,7 @@ srv_g_bivariate <- function(id, anl_merged_q <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") obj %>% teal.code::eval_code( c( diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index ad71879fc..19eecad24 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -637,7 +637,7 @@ srv_distribution <- function(id, obj <- merged$anl_q_r() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Distribution Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") ANL <- obj[["ANL"]] dist_var <- merge_vars()$dist_var diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 22a5fa845..031c0b1f4 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -409,7 +409,7 @@ srv_g_response <- function(id, qenv <- merged$anl_q_r() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Response Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") ANL <- qenv[["ANL"]] resp_var <- as.vector(merged$anl_input_r()$columns_source$response) x <- as.vector(merged$anl_input_r()$columns_source$x) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 8affcd0f5..f613aaed8 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -587,7 +587,7 @@ srv_g_scatterplot <- function(id, qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 56eed5c4d..9b0d87221 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -330,7 +330,7 @@ srv_g_scatterplotmatrix <- function(id, req(anl_merged_input()) obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot Matrix", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") qenv <- teal.code::eval_code(obj, 'library("dplyr");library("lattice")') # nolint: quotes. teal.code::eval_code(qenv, as.expression(anl_merged_input()$expr)) }) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index d00c2efea..c5faa2f97 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -528,7 +528,7 @@ srv_missing_data <- function(id, anl <- data_r() obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Missing Data", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") qenv <- teal.code::eval_code(obj, { 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 188940acc..4512f0add 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -474,7 +474,7 @@ srv_outliers <- function(id, data, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0) - teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "# Module's code") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Module's code") outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index bde874191..74eaff1d9 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -315,7 +315,7 @@ srv_t_crosstable <- function(id, data, label, x, y, basic_table_args, decorators qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Cross Table", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")') # nolint quotes }) anl_merged_q <- reactive({ From 83e41a5513cc8675ae9af45fad36caeee4d87785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:05:45 +0200 Subject: [PATCH 24/38] Update R/tm_a_pca.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com> --- R/tm_a_pca.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index fe783d8ff..7026ee704 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -437,7 +437,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint: quotes. }) anl_merged_q <- reactive({ req(anl_merged_input()) From 229def2843760e9699d0c8339f537277e296a4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:06:28 +0200 Subject: [PATCH 25/38] Update R/tm_a_pca.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com> --- R/tm_a_pca.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 7026ee704..5954c1220 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -436,7 +436,10 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- c( + teal.reporter::teal_card(obj), + "## Module's code" + ) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint: quotes. }) anl_merged_q <- reactive({ From 6fc9bebabbc516275c301425fb1864206d3d4597 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:09:25 +0000 Subject: [PATCH 26/38] [skip style] [skip vbump] Restyle files --- R/tm_a_pca.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 5954c1220..2150055c7 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -437,7 +437,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) teal.reporter::teal_card(obj) <- c( - teal.reporter::teal_card(obj), + teal.reporter::teal_card(obj), "## Module's code" ) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint: quotes. From 6d86ebc27de2b7939a21164ce86b4eee0338a174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:58:18 +0100 Subject: [PATCH 27/38] chore: fix long line --- R/tm_a_pca.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 2150055c7..e0cefcb3b 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -435,7 +435,11 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ) qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0) + teal.reporter::teal_card(obj) <- append( + teal.reporter::teal_card(obj), + "# Principal Component Analysis", + after = 0 + ) teal.reporter::teal_card(obj) <- c( teal.reporter::teal_card(obj), "## Module's code" From 508e3b2031e613993c1e688c87ab0c5e08fdc27c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:01:19 +0000 Subject: [PATCH 28/38] [skip style] [skip vbump] Restyle files --- R/tm_a_pca.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index e0cefcb3b..84693a006 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -436,8 +436,8 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco qenv <- reactive({ obj <- data() teal.reporter::teal_card(obj) <- append( - teal.reporter::teal_card(obj), - "# Principal Component Analysis", + teal.reporter::teal_card(obj), + "# Principal Component Analysis", after = 0 ) teal.reporter::teal_card(obj) <- c( From 3f82dca5a2016f51bedf31ca31103c62a2ac3ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:16:57 +0100 Subject: [PATCH 29/38] chore: remove linter rule --- .lintr | 1 - 1 file changed, 1 deletion(-) diff --git a/.lintr b/.lintr index 113ca30c1..87688e231 100644 --- a/.lintr +++ b/.lintr @@ -1,6 +1,5 @@ linters: linters_with_defaults( line_length_linter = line_length_linter(120), - cyclocomp_linter = NULL, object_usage_linter = NULL, object_name_linter = object_name_linter(styles = c("snake_case", "symbols"), regexes = c(ANL = "^ANL_?[0-9A-Z_]*$", ADaM = "^r?AD[A-Z]{2,3}_?[0-9]*$")), indentation_linter = NULL From 52b4d592f08dff8f9ff0d8da39c9e25b5c223b75 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 10 Jul 2025 14:04:42 +0200 Subject: [PATCH 30/38] substitute append.teal_card with c.teal_card --- R/tm_a_pca.R | 27 ++++++++++++--------------- R/tm_a_regression.R | 10 +++++++--- R/tm_g_association.R | 10 +++++++--- R/tm_g_bivariate.R | 10 +++++++--- R/tm_g_distribution.R | 12 ++++++++---- R/tm_g_response.R | 10 +++++++--- R/tm_g_scatterplot.R | 9 ++++++--- R/tm_g_scatterplotmatrix.R | 9 ++++++--- R/tm_missing_data.R | 15 +++++++++------ R/tm_outliers.R | 16 ++++++++++------ 10 files changed, 79 insertions(+), 49 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 84693a006..50b787f5f 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -435,15 +435,12 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ) qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append( - teal.reporter::teal_card(obj), - "# Principal Component Analysis", - after = 0 - ) - teal.reporter::teal_card(obj) <- c( - teal.reporter::teal_card(obj), - "## Module's code" - ) + teal.reporter::teal_card(obj) <- + c( + teal.reporter::teal_card("# Principal Component Analysis"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint: quotes. }) anl_merged_q <- reactive({ @@ -521,7 +518,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ) ) - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Principal Components Table") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Principal Components Table") qenv <- teal.code::eval_code( qenv, @@ -531,7 +528,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco }) ) - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Eigenvectors Table") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Eigenvectors Table") teal.code::eval_code( qenv, @@ -613,7 +610,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ), ggtheme = ggtheme ) - teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Elbow plot") + teal.reporter::teal_card(base_q) <- c(teal.reporter::teal_card(base_q), "## Elbow plot") teal.code::eval_code( base_q, substitute( @@ -690,7 +687,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ggtheme = ggtheme ) - teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Circle plot") + teal.reporter::teal_card(base_q) <- c(teal.reporter::teal_card(base_q), "## Circle plot") teal.code::eval_code( base_q, substitute( @@ -749,7 +746,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco size <- input$size font_size <- input$font_size - teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Biplot") + teal.reporter::teal_card(base_q) <- c(teal.reporter::teal_card(base_q), "## Biplot") qenv <- teal.code::eval_code( qenv, substitute( @@ -1010,7 +1007,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco parsed_ggplot2_args$theme ) - teal.reporter::teal_card(base_q) <- append(teal.reporter::teal_card(base_q), "## Eigenvector plot") + teal.reporter::teal_card(base_q) <- c(teal.reporter::teal_card(base_q), "## Eigenvector plot") teal.code::eval_code( base_q, substitute( diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 3e828408a..b278a96d5 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -459,8 +459,12 @@ srv_a_regression <- function(id, qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Linear Regression Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- + c( + teal.reporter::teal_card("# Linear Regression Plot"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) @@ -538,7 +542,7 @@ srv_a_regression <- function(id, fit_summary <- summary(fit) fit_summary })) - teal.reporter::teal_card(anl_fit) <- append(teal.reporter::teal_card(anl_fit), "## Plot") + teal.reporter::teal_card(anl_fit) <- c(teal.reporter::teal_card(anl_fit), "## Plot") anl_fit }) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index cbaf26b59..3fbc46f24 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -343,8 +343,12 @@ srv_tm_g_association <- function(id, qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Association Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- + c( + teal.reporter::teal_card("# Association Plot"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes }) anl_merged_q <- reactive({ @@ -494,7 +498,7 @@ srv_tm_g_association <- function(id, ) } obj <- merged$anl_q_r() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "## Plot") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Plot") teal.code::eval_code( obj, substitute( diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 33d246100..a3b787ba7 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -556,8 +556,12 @@ srv_g_bivariate <- function(id, anl_merged_q <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- + c( + teal.reporter::teal_card("# Bivariate Plot"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) obj %>% teal.code::eval_code( c( @@ -691,7 +695,7 @@ srv_g_bivariate <- function(id, } obj <- merged$anl_q_r() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "## Plot") + teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Plot") teal.code::eval_code(obj, substitute(expr = plot <- cl, env = list(cl = cl))) }) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 19eecad24..02fb6169d 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -636,8 +636,12 @@ srv_distribution <- function(id, # Create a private stack for this function only. obj <- merged$anl_q_r() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Distribution Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- + c( + teal.reporter::teal_card("# Distribution Plot"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) ANL <- obj[["ANL"]] dist_var <- merge_vars()$dist_var @@ -953,7 +957,7 @@ srv_distribution <- function(id, ggtheme = ggtheme ) - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Histogram Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Histogram Plot") teal.code::eval_code( qenv, substitute( @@ -1084,7 +1088,7 @@ srv_distribution <- function(id, ggtheme = ggtheme ) - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## QQ Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## QQ Plot") teal.code::eval_code( qenv, substitute( diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 031c0b1f4..6ca284336 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -408,8 +408,12 @@ srv_g_response <- function(id, teal::validate_inputs(iv_r()) qenv <- merged$anl_q_r() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Response Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(qenv) <- + c( + teal.reporter::teal_card("# Response Plot"), + teal.reporter::teal_card(qenv), + teal.reporter::teal_card("## Module's code") + ) ANL <- qenv[["ANL"]] resp_var <- as.vector(merged$anl_input_r()$columns_source$response) x <- as.vector(merged$anl_input_r()$columns_source$x) @@ -569,7 +573,7 @@ srv_g_response <- function(id, ggthemes = parsed_ggplot2_args$ggtheme )) - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Plot") teal.code::eval_code(qenv, plot_call) }) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index f613aaed8..7a7216c02 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -586,8 +586,11 @@ srv_g_scatterplot <- function(id, ) qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- c( + teal.reporter::teal_card("# Scatter Plot"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes }) @@ -1013,7 +1016,7 @@ srv_g_scatterplot <- function(id, plot_call <- substitute(expr = plot <- plot_call, env = list(plot_call = plot_call)) - teal.reporter::teal_card(plot_q) <- append(teal.reporter::teal_card(plot_q), "## Plot") + teal.reporter::teal_card(plot_q) <- c(teal.reporter::teal_card(plot_q), "## Plot") teal.code::eval_code(plot_q, plot_call) }) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 9b0d87221..7eb5ec2ae 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -329,8 +329,11 @@ srv_g_scatterplotmatrix <- function(id, anl_merged_q <- reactive({ req(anl_merged_input()) obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot Matrix", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- c( + teal.reporter::teal_card("# Scatter Plot Matrix"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) qenv <- teal.code::eval_code(obj, 'library("dplyr");library("lattice")') # nolint: quotes. teal.code::eval_code(qenv, as.expression(anl_merged_input()$expr)) }) @@ -392,7 +395,7 @@ srv_g_scatterplotmatrix <- function(id, # create plot - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Plot") if (add_cor) { shinyjs::show("cor_method") diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index c5faa2f97..d7703c5e4 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -527,8 +527,11 @@ srv_missing_data <- function(id, group_var <- input$group_by_var anl <- data_r() obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Missing Data", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- c( + teal.reporter::teal_card("# Missing Data"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) qenv <- teal.code::eval_code(obj, { 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes @@ -697,7 +700,7 @@ srv_missing_data <- function(id, combination_cutoff_q <- reactive({ req(common_code_q()) qenv <- common_code_q() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Combination Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Combination Plot") teal.code::eval_code( qenv, quote( @@ -756,7 +759,7 @@ srv_missing_data <- function(id, ) ) - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Summary Plot") qenv <- teal.code::eval_code( qenv, @@ -1112,7 +1115,7 @@ srv_missing_data <- function(id, } qenv <- common_code_q() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Table") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Summary Table") qenv <- if (!is.null(group_var)) { common_code_libraries_q <- teal.code::eval_code( @@ -1190,7 +1193,7 @@ srv_missing_data <- function(id, } qenv <- common_code_q() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## By Subject Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## By Subject Plot") qenv <- teal.code::eval_code( qenv, diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 4512f0add..fbb448173 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -473,8 +473,12 @@ srv_outliers <- function(id, data, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0) - teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Module's code") + teal.reporter::teal_card(qenv) <- + c( + teal.reporter::teal_card("# Outliers Analysis"), + teal.reporter::teal_card(qenv), + teal.reporter::teal_card("## Module's code") + ) outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -636,7 +640,7 @@ srv_outliers <- function(id, data, outlier_var, ) qenv <- if (length(categorical_var) > 0) { - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Summary Table") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Summary Table") qenv <- teal.code::eval_code( qenv, substitute( @@ -749,7 +753,7 @@ srv_outliers <- function(id, data, outlier_var, box_plot_q <- reactive({ req(common_code_q()) qenv <- common_code_q() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Box Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Box Plot") ANL <- qenv[["ANL"]] ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] @@ -843,7 +847,7 @@ srv_outliers <- function(id, data, outlier_var, # density plot density_plot_q <- reactive({ qenv <- common_code_q() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Density Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Density Plot") ANL <- qenv[["ANL"]] ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] @@ -905,7 +909,7 @@ srv_outliers <- function(id, data, outlier_var, # Cumulative distribution plot cumulative_plot_q <- reactive({ qenv <- common_code_q() - teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "## Cumulative Distribution Plot") + teal.reporter::teal_card(qenv) <- c(teal.reporter::teal_card(qenv), "## Cumulative Distribution Plot") ANL <- qenv[["ANL"]] ANL_OUTLIER <- qenv[["ANL_OUTLIER"]] From 162b9172f0fe5e45a5dd22470995e4b9cf12ff6b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 12:07:44 +0000 Subject: [PATCH 31/38] [skip style] [skip vbump] Restyle files --- R/tm_a_pca.R | 2 +- R/tm_a_regression.R | 2 +- R/tm_g_association.R | 2 +- R/tm_g_bivariate.R | 2 +- R/tm_g_distribution.R | 2 +- R/tm_g_response.R | 2 +- R/tm_outliers.R | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 50b787f5f..0a52134f6 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -435,7 +435,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco ) qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- + teal.reporter::teal_card(obj) <- c( teal.reporter::teal_card("# Principal Component Analysis"), teal.reporter::teal_card(obj), diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index b278a96d5..1b30402fe 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -459,7 +459,7 @@ srv_a_regression <- function(id, qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- + teal.reporter::teal_card(obj) <- c( teal.reporter::teal_card("# Linear Regression Plot"), teal.reporter::teal_card(obj), diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 3fbc46f24..83cdc0940 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -343,7 +343,7 @@ srv_tm_g_association <- function(id, qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- + teal.reporter::teal_card(obj) <- c( teal.reporter::teal_card("# Association Plot"), teal.reporter::teal_card(obj), diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index a3b787ba7..91b4ffc0d 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -556,7 +556,7 @@ srv_g_bivariate <- function(id, anl_merged_q <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- + teal.reporter::teal_card(obj) <- c( teal.reporter::teal_card("# Bivariate Plot"), teal.reporter::teal_card(obj), diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 02fb6169d..1938a02bc 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -636,7 +636,7 @@ srv_distribution <- function(id, # Create a private stack for this function only. obj <- merged$anl_q_r() - teal.reporter::teal_card(obj) <- + teal.reporter::teal_card(obj) <- c( teal.reporter::teal_card("# Distribution Plot"), teal.reporter::teal_card(obj), diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 6ca284336..f28ec6603 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -408,7 +408,7 @@ srv_g_response <- function(id, teal::validate_inputs(iv_r()) qenv <- merged$anl_q_r() - teal.reporter::teal_card(qenv) <- + teal.reporter::teal_card(qenv) <- c( teal.reporter::teal_card("# Response Plot"), teal.reporter::teal_card(qenv), diff --git a/R/tm_outliers.R b/R/tm_outliers.R index fbb448173..3f835c5f1 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -473,7 +473,7 @@ srv_outliers <- function(id, data, outlier_var, ANL <- merged$anl_q_r()[["ANL"]] qenv <- merged$anl_q_r() - teal.reporter::teal_card(qenv) <- + teal.reporter::teal_card(qenv) <- c( teal.reporter::teal_card("# Outliers Analysis"), teal.reporter::teal_card(qenv), From df024099a9c6956889527efd2a7a6fbe363827e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Thu, 10 Jul 2025 14:29:00 +0100 Subject: [PATCH 32/38] chore: lintr using quotes rule with double column and period at the end --- R/tm_a_regression.R | 2 +- R/tm_data_table.R | 2 +- R/tm_g_association.R | 2 +- R/tm_g_distribution.R | 14 +++++++------- R/tm_g_response.R | 2 +- R/tm_g_scatterplot.R | 2 +- R/tm_g_scatterplotmatrix.R | 2 +- R/tm_missing_data.R | 4 ++-- R/tm_outliers.R | 4 ++-- R/tm_t_crosstable.R | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 1b30402fe..bcd03a582 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -465,7 +465,7 @@ srv_a_regression <- function(id, teal.reporter::teal_card(obj), teal.reporter::teal_card("## Module's code") ) - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint: quotes. }) anl_merged_q <- reactive({ diff --git a/R/tm_data_table.R b/R/tm_data_table.R index 603f41c3f..6d41e786b 100644 --- a/R/tm_data_table.R +++ b/R/tm_data_table.R @@ -310,7 +310,7 @@ srv_data_table <- function(id, teal::validate_has_data(df, min_nrow = 1L, msg = paste("data", dataname, "is empty")) qenv <- teal.code::eval_code( data(), - 'library("dplyr");library("DT")' # nolint quotes + 'library("dplyr");library("DT")'# nolint: quotes. ) teal.code::eval_code( qenv, diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 83cdc0940..e4b9d55c0 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -349,7 +349,7 @@ srv_tm_g_association <- function(id, teal.reporter::teal_card(obj), teal.reporter::teal_card("## Module's code") ) - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")')# nolint: quotes. }) anl_merged_q <- reactive({ req(anl_merged_input()) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 1938a02bc..ea098eea5 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -537,7 +537,7 @@ srv_distribution <- function(id, ) qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes + teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")')# nolint: quotes. ) anl_merged_q <- reactive({ @@ -667,7 +667,7 @@ srv_distribution <- function(id, "Group by variable must be `factor`, `character`, or `integer`" ) ) - qenv <- teal.code::eval_code(qenv, 'library("forcats")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("forcats")')# nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -685,7 +685,7 @@ srv_distribution <- function(id, ) ) - qenv <- teal.code::eval_code(qenv, 'library("forcats")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("forcats")')# nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -895,7 +895,7 @@ srv_distribution <- function(id, } if (length(t_dist) != 0 && main_type_var == "Density" && length(g_var) == 0 && length(s_var) == 0) { - qenv <- teal.code::eval_code(qenv, 'library("ggpp")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("ggpp")')# nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -1041,7 +1041,7 @@ srv_distribution <- function(id, ) if (length(t_dist) != 0 && length(g_var) == 0 && length(s_var) == 0) { - qenv <- teal.code::eval_code(qenv, 'library("ggpp")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("ggpp")')# nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -1237,7 +1237,7 @@ srv_distribution <- function(id, qenv <- common_q() if (length(s_var) == 0 && length(g_var) == 0) { - qenv <- teal.code::eval_code(qenv, 'library("generics")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("generics")')# nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -1251,7 +1251,7 @@ srv_distribution <- function(id, ) ) } else { - qenv <- teal.code::eval_code(qenv, 'library("tidyr")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("tidyr")')# nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( diff --git a/R/tm_g_response.R b/R/tm_g_response.R index f28ec6603..fa609738a 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -390,7 +390,7 @@ srv_g_response <- function(id, ) qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes + teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")')# nolint: quotes. ) anl_merged_q <- reactive({ diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 7a7216c02..87f10d65b 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -591,7 +591,7 @@ srv_g_scatterplot <- function(id, teal.reporter::teal_card(obj), teal.reporter::teal_card("## Module's code") ) - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")')# nolint: quotes. }) anl_merged_q <- reactive({ diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 7eb5ec2ae..20e35d341 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -371,7 +371,7 @@ srv_g_scatterplotmatrix <- function(id, # check character columns. If any, then those are converted to factors check_char <- vapply(ANL[, cols_names], is.character, logical(1)) - qenv <- teal.code::eval_code(qenv, 'library("dplyr")') # nolint quotes + qenv <- teal.code::eval_code(qenv, 'library("dplyr")')# nolint: quotes. if (any(check_char)) { qenv <- teal.code::eval_code( qenv, diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index d7703c5e4..30fac6223 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -534,7 +534,7 @@ srv_missing_data <- function(id, ) qenv <- teal.code::eval_code(obj, { - 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes + 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")'# nolint: quotes. }) qenv <- if (!is.null(selected_vars()) && length(selected_vars()) != ncol(anl)) { @@ -1120,7 +1120,7 @@ srv_missing_data <- function(id, qenv <- if (!is.null(group_var)) { common_code_libraries_q <- teal.code::eval_code( qenv, - 'library("forcats");library("glue");' # nolint quotes + 'library("forcats");library("glue");'# nolint: quotes. ) teal.code::eval_code( common_code_libraries_q, diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 3f835c5f1..7b83d9feb 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -446,10 +446,10 @@ srv_outliers <- function(id, data, outlier_var, teal.code::eval_code( data(), paste0( - 'library("dplyr");library("tidyr");', # nolint quotes + 'library("dplyr");library("tidyr");',# nolint: quotes. 'library("tibble");library("ggplot2");' ) - ) %>% # nolint quotes + ) %>%# nolint: quotes. teal.code::eval_code(as.expression(anl_merged_input()$expr)) }) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index f615b616a..3961cfc2b 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -331,7 +331,7 @@ srv_t_crosstable <- function(id, data, label, x, y, remove_zero_columns, basic_t obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Cross Table", after = 0) teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") - teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")') # nolint quotes + teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")')# nolint: quotes. }) anl_merged_q <- reactive({ req(anl_merged_input()) From 7c2dc133d019d4df25494b2bac302aaeb6e4f882 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 13:32:57 +0000 Subject: [PATCH 33/38] [skip style] [skip vbump] Restyle files --- R/tm_data_table.R | 2 +- R/tm_g_association.R | 2 +- R/tm_g_distribution.R | 14 +++++++------- R/tm_g_response.R | 2 +- R/tm_g_scatterplot.R | 2 +- R/tm_g_scatterplotmatrix.R | 2 +- R/tm_missing_data.R | 4 ++-- R/tm_outliers.R | 4 ++-- R/tm_t_crosstable.R | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/R/tm_data_table.R b/R/tm_data_table.R index 6d41e786b..7f1fb7068 100644 --- a/R/tm_data_table.R +++ b/R/tm_data_table.R @@ -310,7 +310,7 @@ srv_data_table <- function(id, teal::validate_has_data(df, min_nrow = 1L, msg = paste("data", dataname, "is empty")) qenv <- teal.code::eval_code( data(), - 'library("dplyr");library("DT")'# nolint: quotes. + 'library("dplyr");library("DT")' # nolint: quotes. ) teal.code::eval_code( qenv, diff --git a/R/tm_g_association.R b/R/tm_g_association.R index e4b9d55c0..7240aef12 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -349,7 +349,7 @@ srv_tm_g_association <- function(id, teal.reporter::teal_card(obj), teal.reporter::teal_card("## Module's code") ) - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")')# nolint: quotes. + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint: quotes. }) anl_merged_q <- reactive({ req(anl_merged_input()) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index ea098eea5..437a81b67 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -537,7 +537,7 @@ srv_distribution <- function(id, ) qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")')# nolint: quotes. + teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint: quotes. ) anl_merged_q <- reactive({ @@ -667,7 +667,7 @@ srv_distribution <- function(id, "Group by variable must be `factor`, `character`, or `integer`" ) ) - qenv <- teal.code::eval_code(qenv, 'library("forcats")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("forcats")') # nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -685,7 +685,7 @@ srv_distribution <- function(id, ) ) - qenv <- teal.code::eval_code(qenv, 'library("forcats")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("forcats")') # nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -895,7 +895,7 @@ srv_distribution <- function(id, } if (length(t_dist) != 0 && main_type_var == "Density" && length(g_var) == 0 && length(s_var) == 0) { - qenv <- teal.code::eval_code(qenv, 'library("ggpp")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("ggpp")') # nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -1041,7 +1041,7 @@ srv_distribution <- function(id, ) if (length(t_dist) != 0 && length(g_var) == 0 && length(s_var) == 0) { - qenv <- teal.code::eval_code(qenv, 'library("ggpp")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("ggpp")') # nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -1237,7 +1237,7 @@ srv_distribution <- function(id, qenv <- common_q() if (length(s_var) == 0 && length(g_var) == 0) { - qenv <- teal.code::eval_code(qenv, 'library("generics")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("generics")') # nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( @@ -1251,7 +1251,7 @@ srv_distribution <- function(id, ) ) } else { - qenv <- teal.code::eval_code(qenv, 'library("tidyr")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("tidyr")') # nolint: quotes. qenv <- teal.code::eval_code( qenv, substitute( diff --git a/R/tm_g_response.R b/R/tm_g_response.R index fa609738a..c760e6bae 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -390,7 +390,7 @@ srv_g_response <- function(id, ) qenv <- reactive( - teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")')# nolint: quotes. + teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint: quotes. ) anl_merged_q <- reactive({ diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 87f10d65b..a74e953e5 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -591,7 +591,7 @@ srv_g_scatterplot <- function(id, teal.reporter::teal_card(obj), teal.reporter::teal_card("## Module's code") ) - teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")')# nolint: quotes. + teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint: quotes. }) anl_merged_q <- reactive({ diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 20e35d341..c3cae54b1 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -371,7 +371,7 @@ srv_g_scatterplotmatrix <- function(id, # check character columns. If any, then those are converted to factors check_char <- vapply(ANL[, cols_names], is.character, logical(1)) - qenv <- teal.code::eval_code(qenv, 'library("dplyr")')# nolint: quotes. + qenv <- teal.code::eval_code(qenv, 'library("dplyr")') # nolint: quotes. if (any(check_char)) { qenv <- teal.code::eval_code( qenv, diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 30fac6223..a60cb58e2 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -534,7 +534,7 @@ srv_missing_data <- function(id, ) qenv <- teal.code::eval_code(obj, { - 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")'# nolint: quotes. + 'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint: quotes. }) qenv <- if (!is.null(selected_vars()) && length(selected_vars()) != ncol(anl)) { @@ -1120,7 +1120,7 @@ srv_missing_data <- function(id, qenv <- if (!is.null(group_var)) { common_code_libraries_q <- teal.code::eval_code( qenv, - 'library("forcats");library("glue");'# nolint: quotes. + 'library("forcats");library("glue");' # nolint: quotes. ) teal.code::eval_code( common_code_libraries_q, diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 7b83d9feb..c8fd2c3e5 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -446,10 +446,10 @@ srv_outliers <- function(id, data, outlier_var, teal.code::eval_code( data(), paste0( - 'library("dplyr");library("tidyr");',# nolint: quotes. + 'library("dplyr");library("tidyr");', # nolint: quotes. 'library("tibble");library("ggplot2");' ) - ) %>%# nolint: quotes. + ) %>% # nolint: quotes. teal.code::eval_code(as.expression(anl_merged_input()$expr)) }) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 3961cfc2b..2a263b7d8 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -331,7 +331,7 @@ srv_t_crosstable <- function(id, data, label, x, y, remove_zero_columns, basic_t obj <- data() teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Cross Table", after = 0) teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") - teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")')# nolint: quotes. + teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")') # nolint: quotes. }) anl_merged_q <- reactive({ req(anl_merged_input()) From 85f15deaf7cde29f5791858a617cfa79b0231b24 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Fri, 11 Jul 2025 14:35:01 +0200 Subject: [PATCH 34/38] Update R/tm_g_bivariate.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> --- R/tm_g_bivariate.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 91b4ffc0d..109b7382f 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -565,7 +565,7 @@ srv_g_bivariate <- function(id, obj %>% teal.code::eval_code( c( - expression(library(ggplot2), library(dplyr), library(teal.modules.general)), + expression(library(ggplot2), library(dplyr)), as.expression(anl_merged_input()$expr) ) ) From 5ad53e9232aba31078378f8c6ecfc752a7f874a3 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Fri, 11 Jul 2025 14:40:49 +0200 Subject: [PATCH 35/38] Update R/tm_missing_data.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> --- R/tm_missing_data.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index a60cb58e2..7ca520475 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -1303,7 +1303,6 @@ srv_missing_data <- function(id, expr = quote({ grid::grid.newpage() grid::grid.draw(combination_plot) - combination_plot }) ) From 3bbf228f5a5def486c2dbec03bc990120e744311 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Fri, 11 Jul 2025 15:01:24 +0200 Subject: [PATCH 36/38] Update R/tm_t_crosstable.R Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> --- R/tm_t_crosstable.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 2a263b7d8..27f584d67 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -329,8 +329,12 @@ srv_t_crosstable <- function(id, data, label, x, y, remove_zero_columns, basic_t ) qenv <- reactive({ obj <- data() - teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Cross Table", after = 0) - teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "## Module's code") + teal.reporter::teal_card(obj) <- + c( + teal.reporter::teal_card("# Cross Table"), + teal.reporter::teal_card(obj), + teal.reporter::teal_card("## Module's code") + ) teal.code::eval_code(obj, 'library("rtables");library("tern");library("dplyr")') # nolint: quotes. }) anl_merged_q <- reactive({ From b64c3d790a4de11b27de94f17fdad563cdaf19c3 Mon Sep 17 00:00:00 2001 From: m7pr Date: Fri, 11 Jul 2025 15:06:21 +0200 Subject: [PATCH 37/38] missing assignment --- R/tm_t_crosstable.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 27f584d67..59d6a634a 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -390,7 +390,7 @@ srv_t_crosstable <- function(id, data, label, x, y, remove_zero_columns, basic_t obj <- merged$anl_q_r() teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Table") - teal.code::eval_code( + obj <- teal.code::eval_code( obj, substitute( expr = { From 16c525b4fb06169548d4a3635d089d242222f100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Fri, 11 Jul 2025 15:14:48 +0200 Subject: [PATCH 38/38] Update R/tm_g_association.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com> --- R/tm_g_association.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 7240aef12..f8d16112b 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -510,7 +510,7 @@ srv_tm_g_association <- function(id, substitute( expr = { plots <- plot_calls - plot <- gridExtra::grid.arrange(plots[[1]], plots[[2]], ncol = 1) + plot <- gridExtra::arrangeGrob(plots[[1]], plots[[2]], ncol = 1) }, env = list( plot_calls = do.call(