Skip to content

Commit 5f0735c

Browse files
authored
1 parent 104cae1 commit 5f0735c

File tree

10 files changed

+21
-94
lines changed

10 files changed

+21
-94
lines changed

R/tm_g_ae_oview.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ ui_g_ae_oview <- function(id, ...) {
186186
titles = "AE Overview",
187187
footnotes = ""
188188
)
189-
),
190-
forms = tagList(
191-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
192189
)
193190
)
194191
}
@@ -337,12 +334,6 @@ srv_g_ae_oview <- function(id,
337334
)
338335

339336
plot_r <- reactive(output_q()[["plot"]])
340-
341-
teal.widgets::verbatim_popup_srv(
342-
id = "rcode",
343-
verbatim_content = reactive(teal.code::get_code(output_q())),
344-
title = paste("R code for", label)
345-
)
346337
set_chunk_dims(pws, output_q)
347338
})
348339
}

R/tm_g_ae_sub.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ ui_g_ae_sub <- function(id, ...) {
163163
footnotes = ""
164164
)
165165
)
166-
),
167-
forms = tagList(
168-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
169166
)
170167
)
171168
}
@@ -379,12 +376,6 @@ srv_g_ae_sub <- function(id,
379376
)
380377

381378
plot_r <- reactive(output_q()[["plot"]])
382-
383-
teal.widgets::verbatim_popup_srv(
384-
id = "rcode",
385-
verbatim_content = reactive(teal.code::get_code(output_q())),
386-
title = paste("R code for", label),
387-
)
388379
set_chunk_dims(pws, output_q)
389380
})
390381
}

R/tm_g_butterfly.R

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ ui_g_butterfly <- function(id, ...) {
253253
value = a$legend_on
254254
)
255255
),
256-
forms = tagList(
257-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
258-
),
259256
pre_output = a$pre_output,
260257
post_output = a$post_output
261258
)
@@ -471,16 +468,22 @@ srv_g_butterfly <- function(id, data, dataname, label, plot_height, plot_width)
471468
teal.reporter::teal_card(q1) <- c(teal.reporter::teal_card(q1), "### Selected Options")
472469
}
473470
if (!is.null(input$filter_var)) {
474-
teal.reporter::teal_card(q1) <-
475-
c(teal.reporter::teal_card(q1), paste0("Preset Data Filters: ", paste(input$filter_var, collapse = ", "), "."))
471+
teal.reporter::teal_card(q1) <- c(
472+
teal.reporter::teal_card(q1),
473+
sprintf("Preset Data Filters: %s.", paste(input$filter_var, collapse = ", "))
474+
)
476475
}
477476
if (!is.null(input$facet_var)) {
478-
teal.reporter::teal_card(q1) <-
479-
c(teal.reporter::teal_card(q1), paste0("Faceted by: ", paste(input$facet_var, collapse = ", "), "."))
477+
teal.reporter::teal_card(q1) <- c(
478+
teal.reporter::teal_card(q1),
479+
sprintf("Faceted by: %s.", paste(input$facet_var, collapse = ", "))
480+
)
480481
}
481482
if (!is.null(input$sort_by_var)) {
482-
teal.reporter::teal_card(q1) <-
483-
c(teal.reporter::teal_card(q1), paste0("Sorted by: ", paste(input$sort_by_var, collapse = ", "), "."))
483+
teal.reporter::teal_card(q1) <- c(
484+
teal.reporter::teal_card(q1),
485+
sprintf("Sorted by: %s.", paste(input$sort_by_var, collapse = ", "))
486+
)
484487
}
485488

486489
if (!is.null(right_val) && !is.null(left_val)) {
@@ -528,11 +531,6 @@ srv_g_butterfly <- function(id, data, dataname, label, plot_height, plot_width)
528531
width = plot_width
529532
)
530533

531-
teal.widgets::verbatim_popup_srv(
532-
id = "rcode",
533-
title = paste("R code for", label),
534-
verbatim_content = reactive(teal.code::get_code(output_q()))
535-
)
536534
set_chunk_dims(pws, output_q)
537535
})
538536
}

R/tm_g_decorate.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,7 @@ srv_g_decorate <- function(id,
7575
width = plot_width
7676
)
7777

78-
return(
79-
list(
80-
font_size = reactive(input$fontsize),
81-
pws = pws
82-
)
83-
)
78+
list(font_size = reactive(input$fontsize), pws = pws)
8479
})
8580
}
8681

R/tm_g_events_term_id.R

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ ui_g_events_term_id <- function(id, ...) {
190190
titles = "Common AE Table",
191191
footnotes = ""
192192
)
193-
),
194-
forms = tagList(
195-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
196193
)
197194
)
198195
}
@@ -246,7 +243,6 @@ srv_g_events_term_id <- function(id,
246243
)
247244
})
248245

249-
250246
observeEvent(input$sort,
251247
{
252248
sort <- if (is.null(input$sort)) " " else input$sort
@@ -365,12 +361,6 @@ srv_g_events_term_id <- function(id,
365361
})
366362

367363
plot_r <- reactive(output_q()[["plot"]])
368-
369-
teal.widgets::verbatim_popup_srv(
370-
id = "rcode",
371-
title = paste("R code for", label),
372-
verbatim_content = reactive(teal.code::get_code(output_q()))
373-
)
374364
set_chunk_dims(pws, output_q)
375365
})
376366
}

R/tm_g_heat_bygrade.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@ ui_g_heatmap_bygrade <- function(id, ...) {
264264
titles = "Heatmap by Grade",
265265
footnotes = ""
266266
)
267-
),
268-
forms = tagList(
269-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
270267
)
271268
)
272269
)
@@ -459,12 +456,6 @@ srv_g_heatmap_bygrade <- function(id,
459456
)
460457

461458
plot_r <- reactive(output_q()[["plot"]])
462-
463-
teal.widgets::verbatim_popup_srv(
464-
id = "rcode",
465-
title = paste("R code for", label),
466-
verbatim_content = reactive(teal.code::get_code(output_q()))
467-
)
468459
set_chunk_dims(pws, output_q)
469460
})
470461
}

R/tm_g_patient_profile.R

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,6 @@ ui_g_patient_profile <- function(id, ...) {
327327
value = a$x_limit
328328
)
329329
),
330-
forms = tagList(
331-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
332-
),
333330
pre_output = a$pre_output,
334331
post_output = a$post_output
335332
)
@@ -913,11 +910,6 @@ srv_g_patient_profile <- function(id,
913910
width = plot_width
914911
)
915912

916-
teal.widgets::verbatim_popup_srv(
917-
id = "rcode",
918-
title = paste("R code for", label),
919-
verbatim_content = reactive(teal.code::get_code(output_q()))
920-
)
921913
set_chunk_dims(pws, output_q)
922914
})
923915
}

R/tm_g_spiderplot.R

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@ ui_g_spider <- function(id, ...) {
235235
value = a$href_line
236236
)
237237
),
238-
forms = tagList(
239-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
240-
),
241238
pre_output = a$pre_output,
242239
post_output = a$post_output
243240
)
@@ -396,12 +393,16 @@ srv_g_spider <- function(id, data, dataname, paramcd, label, plot_height, plot_w
396393
c(teal.reporter::teal_card(q1), paste0("Parameter - (from ", dataname, "): ", input$paramcd, "."))
397394
}
398395
if (!is.null(input$xfacet_var)) {
399-
teal.reporter::teal_card(q1) <-
400-
c(teal.reporter::teal_card(q1), paste0("Faceted horizontally by: ", paste(input$xfacet_var, collapse = ", "), "."))
396+
teal.reporter::teal_card(q1) <- c(
397+
teal.reporter::teal_card(q1),
398+
sprintf("Faceted horizontally by: %s.", paste(input$xfacet_var, collapse = ", "))
399+
)
401400
}
402401
if (!is.null(input$yfacet_var)) {
403-
teal.reporter::teal_card(q1) <-
404-
c(teal.reporter::teal_card(q1), paste0("Faceted vertically by: ", paste(input$yfacet_var, collapse = ", "), "."))
402+
teal.reporter::teal_card(q1) <- c(
403+
teal.reporter::teal_card(q1),
404+
sprintf("Faceted vertically by: %s.", paste(input$yfacet_var, collapse = ", "))
405+
)
405406
}
406407

407408
q1 <- teal.code::eval_code(
@@ -460,11 +461,6 @@ srv_g_spider <- function(id, data, dataname, paramcd, label, plot_height, plot_w
460461
width = plot_width
461462
)
462463

463-
teal.widgets::verbatim_popup_srv(
464-
id = "rcode",
465-
title = paste("R code for", label),
466-
verbatim_content = reactive(teal.code::get_code(output_q()))
467-
)
468464
set_chunk_dims(pws, output_q)
469465
})
470466
}

R/tm_g_swimlane.R

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ ui_g_swimlane <- function(id, ...) {
248248
value = paste(a$vref_line, collapse = ", ")
249249
)
250250
),
251-
forms = tagList(
252-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
253-
),
254251
pre_output = a$pre_output,
255252
post_output = a$post_output
256253
)
@@ -525,11 +522,6 @@ srv_g_swimlane <- function(id,
525522
width = plot_width
526523
)
527524

528-
teal.widgets::verbatim_popup_srv(
529-
id = "rcode",
530-
title = paste("R code for", label),
531-
verbatim_content = reactive(teal.code::get_code(output_q()))
532-
)
533525
set_chunk_dims(pws, output_q)
534526
})
535527
}

R/tm_g_waterfall.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,6 @@ ui_g_waterfall <- function(id, ...) {
258258
value = a$gap_point_val
259259
)
260260
),
261-
forms = tagList(
262-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
263-
),
264261
pre_output = a$pre_output,
265262
post_output = a$post_output
266263
)
@@ -590,12 +587,6 @@ srv_g_waterfall <- function(id,
590587
width = plot_width
591588
)
592589

593-
# Show R Code
594-
teal.widgets::verbatim_popup_srv(
595-
id = "rcode",
596-
title = paste("R code for", label),
597-
verbatim_content = reactive(teal.code::get_code(output_q()))
598-
)
599590
set_chunk_dims(pws, output_q)
600591
})
601592
}

0 commit comments

Comments
 (0)