@@ -265,7 +265,7 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, dataname
265265 })
266266 })
267267
268- lapply (
268+ result <- sapply (
269269 datanames ,
270270 function (x ) {
271271 srv_missing_data(
@@ -280,8 +280,18 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, dataname
280280 ggplot2_args = ggplot2_args ,
281281 decorators = decorators
282282 )
283- }
283+ },
284+ USE.NAMES = TRUE ,
285+ simplify = FALSE
284286 )
287+
288+ reactive({
289+ if (is.null(input $ dataname_tab )) {
290+ teal.data :: teal_data()
291+ } else {
292+ result [[input $ dataname_tab ]]()
293+ }
294+ })
285295 })
286296}
287297
@@ -521,7 +531,10 @@ srv_missing_data <- function(id,
521531
522532 group_var <- input $ group_by_var
523533 anl <- data_r()
524- qenv <- teal.code :: eval_code(data(), {
534+ obj <- data()
535+ teal.reporter :: teal_card(obj ) <- c(teal.reporter :: teal_card(obj ), " # Module's computation" )
536+
537+ qenv <- teal.code :: eval_code(obj , {
525538 ' library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes
526539 })
527540
@@ -1272,6 +1285,7 @@ srv_missing_data <- function(id,
12721285 expr = quote({
12731286 grid :: grid.newpage()
12741287 grid :: grid.draw(summary_plot )
1288+ summary_plot
12751289 })
12761290 )
12771291
@@ -1282,6 +1296,7 @@ srv_missing_data <- function(id,
12821296 expr = quote({
12831297 grid :: grid.newpage()
12841298 grid :: grid.draw(combination_plot )
1299+ combination_plot
12851300 })
12861301 )
12871302
@@ -1417,5 +1432,7 @@ srv_missing_data <- function(id,
14171432 teal.reporter :: simple_reporter_srv(" simple_reporter" , reporter = reporter , card_fun = card_fun )
14181433 }
14191434 # ##
1435+
1436+ decorated_final_q
14201437 })
14211438}
0 commit comments