@@ -533,7 +533,7 @@ srv_missing_data <- function(id,
533533 group_var <- input $ group_by_var
534534 anl <- data_r()
535535 qenv <- teal.code :: eval_code(data(), {
536- ' library("dplyr");library("ggplot2");library("tidyr");library("forcats");library("glue") '
536+ ' library("dplyr");library("ggplot2");library("tidyr");library("gridExtra") ' # nolint quotes
537537 })
538538
539539 qenv <- if (! is.null(selected_vars()) && length(selected_vars()) != ncol(anl )) {
@@ -927,14 +927,14 @@ srv_missing_data <- function(id,
927927
928928 if (isTRUE(input $ if_patients_plot )) {
929929 within(qenv , {
930- g1 <- ggplotGrob(summary_plot_top )
931- g2 <- ggplotGrob(summary_plot_bottom )
930+ g1 <- ggplot2 :: ggplotGrob(summary_plot_top )
931+ g2 <- ggplot2 :: ggplotGrob(summary_plot_bottom )
932932 summary_plot <- gridExtra :: gtable_cbind(g1 , g2 , size = " first" )
933933 summary_plot $ heights <- grid :: unit.pmax(g1 $ heights , g2 $ heights )
934934 })
935935 } else {
936936 within(qenv , {
937- g1 <- ggplotGrob(summary_plot_top )
937+ g1 <- ggplot2 :: ggplotGrob(summary_plot_top )
938938 summary_plot <- g1
939939 })
940940 }
@@ -1067,8 +1067,8 @@ srv_missing_data <- function(id,
10671067 )
10681068
10691069 within(qenv , {
1070- g1 <- ggplotGrob(combination_plot_top )
1071- g2 <- ggplotGrob(combination_plot_bottom )
1070+ g1 <- ggplot2 :: ggplotGrob(combination_plot_top )
1071+ g2 <- ggplot2 :: ggplotGrob(combination_plot_bottom )
10721072
10731073 combination_plot <- gridExtra :: gtable_rbind(g1 , g2 , size = " last" )
10741074 combination_plot $ heights [7 ] <- grid :: unit(0.2 , " null" ) # rescale to get the bar chart smaller
@@ -1112,8 +1112,11 @@ srv_missing_data <- function(id,
11121112 }
11131113
11141114 qenv <- if (! is.null(group_var )) {
1115+ common_code_libraries_q <- teal.code :: eval_code(common_code_q(),
1116+ ' library("forcats");library("glue");library("rlistings")' # nolint quotes
1117+ )
11151118 teal.code :: eval_code(
1116- common_code_q() ,
1119+ common_code_libraries_q ,
11171120 substitute(
11181121 expr = {
11191122 summary_data <- ANL %> %
0 commit comments