Skip to content

Commit 56020d4

Browse files
authored
Merge branch 'main' into 495_plot_missing@main
2 parents c296936 + 84871a5 commit 56020d4

13 files changed

+13
-160
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Type: Package
22
Package: teal.modules.general
33
Title: General Modules for 'teal' Applications
4-
Version: 0.5.0.9004
5-
Date: 2025-10-01
4+
Version: 0.5.0.9005
5+
Date: 2025-10-07
66
Authors@R: c(
77
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
88
person("Pawel", "Rucki", , "[email protected]", role = "aut"),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# teal.modules.general 0.5.0.9004
1+
# teal.modules.general 0.5.0.9005
22

33
### Enhancements
44

R/tm_a_pca.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,6 @@ ui_a_pca <- function(id, ...) {
341341
)
342342
)
343343
),
344-
forms = tagList(
345-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
346-
),
347344
pre_output = args$pre_output,
348345
post_output = args$post_output
349346
)
@@ -1080,8 +1077,6 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco
10801077
graph_align = "center"
10811078
)
10821079

1083-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q)
1084-
10851080
# tables ----
10861081
output$tbl_importance <- renderTable(
10871082
expr = {
@@ -1135,14 +1130,6 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco
11351130
)
11361131
})
11371132

1138-
# Render R code.
1139-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_q())))
1140-
1141-
teal.widgets::verbatim_popup_srv(
1142-
id = "rcode",
1143-
verbatim_content = source_code_r,
1144-
title = "R Code for PCA"
1145-
)
1146-
decorated_output_dims_q
1133+
set_chunk_dims(pws, decorated_output_q)
11471134
})
11481135
}

R/tm_a_regression.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,6 @@ ui_a_regression <- function(id, ...) {
374374
)
375375
)
376376
),
377-
forms = tagList(
378-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
379-
),
380377
pre_output = args$pre_output,
381378
post_output = args$post_output
382379
)
@@ -1021,22 +1018,12 @@ srv_a_regression <- function(id,
10211018
width = plot_width
10221019
)
10231020

1024-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q)
1025-
10261021
output$text <- renderText({
10271022
req(iv_r()$is_valid())
10281023
req(iv_out$is_valid())
10291024
paste(utils::capture.output(summary(fitted()))[-1], collapse = "\n")
10301025
})
10311026

1032-
# Render R code.
1033-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
1034-
1035-
teal.widgets::verbatim_popup_srv(
1036-
id = "rcode",
1037-
verbatim_content = source_code_r,
1038-
title = "R code for the regression plot",
1039-
)
1040-
decorated_output_dims_q
1027+
set_chunk_dims(pws, decorated_output_q)
10411028
})
10421029
}

R/tm_g_association.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,6 @@ ui_tm_g_association <- function(id, ...) {
289289
)
290290
)
291291
),
292-
forms = tagList(
293-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
294-
),
295292
pre_output = args$pre_output,
296293
post_output = args$post_output
297294
)
@@ -545,18 +542,8 @@ srv_tm_g_association <- function(id,
545542
width = plot_width
546543
)
547544

548-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_grob_q)
549-
550545
output$title <- renderText(output_q()[["title"]])
551546

552-
# Render R code.
553-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
554-
555-
teal.widgets::verbatim_popup_srv(
556-
id = "rcode",
557-
verbatim_content = source_code_r,
558-
title = "Association Plot"
559-
)
560-
decorated_output_dims_q
547+
set_chunk_dims(pws, decorated_output_grob_q)
561548
})
562549
}

R/tm_g_bivariate.R

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,6 @@ ui_g_bivariate <- function(id, ...) {
466466
)
467467
)
468468
),
469-
forms = tagList(
470-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
471-
),
472469
pre_output = args$pre_output,
473470
post_output = args$post_output
474471
)
@@ -737,18 +734,7 @@ srv_g_bivariate <- function(id,
737734
width = plot_width
738735
)
739736

740-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q_facets)
741-
742-
# Render R code.
743-
744-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
745-
746-
teal.widgets::verbatim_popup_srv(
747-
id = "rcode",
748-
verbatim_content = source_code_r,
749-
title = "Bivariate Plot"
750-
)
751-
decorated_output_dims_q
737+
set_chunk_dims(pws, decorated_output_q_facets)
752738
})
753739
}
754740

R/tm_g_distribution.R

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,6 @@ ui_distribution <- function(id, ...) {
377377
)
378378
)
379379
),
380-
forms = tagList(
381-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
382-
),
383380
pre_output = args$pre_output,
384381
post_output = args$post_output
385382
)
@@ -1402,14 +1399,6 @@ srv_distribution <- function(id,
14021399

14031400
output$t_stats <- DT::renderDataTable(tests_r())
14041401

1405-
# Render R code.
1406-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_q())))
1407-
1408-
teal.widgets::verbatim_popup_srv(
1409-
id = "rcode",
1410-
verbatim_content = source_code_r,
1411-
title = "R Code for distribution"
1412-
)
14131402
decorated_output_q
14141403
})
14151404
}

R/tm_g_response.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,6 @@ ui_g_response <- function(id, ...) {
320320
)
321321
)
322322
),
323-
forms = tagList(
324-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
325-
),
326323
pre_output = args$pre_output,
327324
post_output = args$post_output
328325
)
@@ -594,16 +591,6 @@ srv_g_response <- function(id,
594591
width = plot_width
595592
)
596593

597-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_plot_q)
598-
599-
# Render R code.
600-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
601-
602-
teal.widgets::verbatim_popup_srv(
603-
id = "rcode",
604-
verbatim_content = source_code_r,
605-
title = "Show R Code for Response"
606-
)
607-
decorated_output_dims_q
594+
set_chunk_dims(pws, decorated_output_plot_q)
608595
})
609596
}

R/tm_g_scatterplot.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,6 @@ ui_g_scatterplot <- function(id, ...) {
495495
)
496496
)
497497
),
498-
forms = tagList(
499-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
500-
),
501498
pre_output = args$pre_output,
502499
post_output = args$post_output
503500
)
@@ -1037,8 +1034,6 @@ srv_g_scatterplot <- function(id,
10371034
brushing = TRUE
10381035
)
10391036

1040-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_plot_q)
1041-
10421037
output$data_table <- DT::renderDataTable({
10431038
plot_brush <- pws$brush()
10441039

@@ -1067,14 +1062,6 @@ srv_g_scatterplot <- function(id,
10671062
}
10681063
})
10691064

1070-
# Render R code.
1071-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
1072-
1073-
teal.widgets::verbatim_popup_srv(
1074-
id = "rcode",
1075-
verbatim_content = source_code_r,
1076-
title = "R Code for scatterplot"
1077-
)
1078-
decorated_output_dims_q
1065+
set_chunk_dims(pws, decorated_output_plot_q)
10791066
})
10801067
}

R/tm_g_scatterplotmatrix.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,6 @@ ui_g_scatterplotmatrix <- function(id, ...) {
288288
)
289289
)
290290
),
291-
forms = tagList(
292-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
293-
),
294291
pre_output = args$pre_output,
295292
post_output = args$post_output
296293
)
@@ -479,8 +476,6 @@ srv_g_scatterplotmatrix <- function(id,
479476
width = plot_width
480477
)
481478

482-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q)
483-
484479
# show a message if conversion to factors took place
485480
output$message <- renderText({
486481
req(iv_r()$is_valid())
@@ -503,15 +498,7 @@ srv_g_scatterplotmatrix <- function(id,
503498
}
504499
})
505500

506-
# Render R code.
507-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
508-
509-
teal.widgets::verbatim_popup_srv(
510-
id = "rcode",
511-
verbatim_content = source_code_r,
512-
title = "Show R Code for Scatterplotmatrix"
513-
)
514-
decorated_output_dims_q
501+
set_chunk_dims(pws, decorated_output_q)
515502
})
516503
}
517504

0 commit comments

Comments
 (0)