Skip to content

Commit a71bb7f

Browse files
committed
remove src
1 parent 460cb36 commit a71bb7f

9 files changed

+8
-125
lines changed

R/tm_a_pca_picks.R

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,6 @@ ui_a_pca.picks <- function(id,
219219
)
220220
)
221221
),
222-
forms = tagList(
223-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
224-
),
225222
pre_output = pre_output,
226223
post_output = post_output
227224
)
@@ -894,8 +891,6 @@ srv_a_pca.picks <- function(id, data, dat, plot_height, plot_width, ggplot2_args
894891
graph_align = "center"
895892
)
896893

897-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q)
898-
899894
# tables ----
900895
output$tbl_importance <- renderTable(
901896
expr = {
@@ -923,15 +918,6 @@ srv_a_pca.picks <- function(id, data, dat, plot_height, plot_width, ggplot2_args
923918
req("eigenvector" %in% input$tables_display)
924919
})
925920

926-
927-
# Render R code.
928-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_q())))
929-
930-
teal.widgets::verbatim_popup_srv(
931-
id = "rcode",
932-
verbatim_content = source_code_r,
933-
title = "R Code for PCA"
934-
)
935-
decorated_output_dims_q
921+
set_chunk_dims(pws, decorated_output_q)
936922
})
937923
}

R/tm_a_regression_picks.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,6 @@ ui_a_regression.picks <- function(id,
225225
)
226226
)
227227
),
228-
forms = tagList(
229-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
230-
),
231228
pre_output = pre_output,
232229
post_output = post_output
233230
)
@@ -787,20 +784,10 @@ srv_a_regression.picks <- function(id,
787784
width = plot_width
788785
)
789786

790-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q)
791-
792787
output$text <- renderText({
793788
paste(utils::capture.output(summary(fitted()))[-1], collapse = "\n")
794789
})
795790

796-
# Render R code.
797-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
798-
799-
teal.widgets::verbatim_popup_srv(
800-
id = "rcode",
801-
verbatim_content = source_code_r,
802-
title = "R code for the regression plot",
803-
)
804-
decorated_output_dims_q
791+
set_chunk_dims(pws, decorated_output_q)
805792
})
806793
}

R/tm_g_association_picks.R

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ ui_g_association.picks <- function(id,
137137
)
138138
)
139139
),
140-
forms = tagList(
141-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
142-
),
143140
pre_output = pre_output,
144141
post_output = post_output
145142
)
@@ -361,18 +358,9 @@ srv_g_association.picks <- function(id,
361358
width = plot_width
362359
)
363360

364-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_grob_q)
365361

366362
output$title <- renderText(output_q()[["title"]])
367363

368-
# Render R code.
369-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
370-
371-
teal.widgets::verbatim_popup_srv(
372-
id = "rcode",
373-
verbatim_content = source_code_r,
374-
title = "Association Plot"
375-
)
376-
decorated_output_dims_q
364+
set_chunk_dims(pws, decorated_output_grob_q)
377365
})
378366
}

R/tm_g_bivariate_picks.R

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ ui_g_bivariate.picks <- function(id,
244244
ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(decorators, "plot"))
245245
)
246246
),
247-
forms = tagList(
248-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
249-
),
250247
pre_output = pre_output,
251248
post_output = post_output
252249
)
@@ -479,17 +476,6 @@ srv_g_bivariate.picks <- function(id,
479476
width = plot_width
480477
)
481478

482-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q_facets)
483-
484-
# Render R code.
485-
486-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
487-
488-
teal.widgets::verbatim_popup_srv(
489-
id = "rcode",
490-
verbatim_content = source_code_r,
491-
title = "Bivariate Plot"
492-
)
493-
decorated_output_dims_q
479+
set_chunk_dims(pws, decorated_output_q_facets)
494480
})
495481
}

R/tm_g_distribution_picks.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ ui_g_distribution.picks <- function(id,
188188
)
189189
)
190190
),
191-
forms = tagList(
192-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
193-
),
194191
pre_output = pre_output,
195192
post_output = post_output
196193
)
@@ -519,15 +516,6 @@ srv_g_distribution.picks <- function(id,
519516
# )
520517
# out_q
521518
# })
522-
523-
# Render R code.
524-
# source_code_r <- reactive(teal.code::get_code(req(decorated_output_q())))
525-
526-
# teal.widgets::verbatim_popup_srv(
527-
# id = "rcode",
528-
# verbatim_content = source_code_r,
529-
# title = "R Code for distribution"
530-
# )
531519
NULL
532520
})
533521
}

R/tm_g_response_picks.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ ui_g_response.picks <- function(id,
141141
)
142142
)
143143
),
144-
forms = tagList(
145-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
146-
),
147144
pre_output = pre_output,
148145
post_output = post_output
149146
)
@@ -390,16 +387,6 @@ srv_g_response.picks <- function(id,
390387
width = plot_width
391388
)
392389

393-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_plot_q)
394-
395-
# Render R code.
396-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
397-
398-
teal.widgets::verbatim_popup_srv(
399-
id = "rcode",
400-
verbatim_content = source_code_r,
401-
title = "Show R Code for Response"
402-
)
403-
decorated_output_dims_q
390+
set_chunk_dims(pws, decorated_output_plot_q)
404391
})
405392
}

R/tm_g_scatterplot_picks.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ ui_g_scatterplot.picks <- function(id,
244244
)
245245
)
246246
),
247-
forms = tagList(
248-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
249-
),
250247
pre_output = pre_output,
251248
post_output = post_output
252249
)
@@ -758,8 +755,6 @@ srv_g_scatterplot.picks <- function(id,
758755
click = TRUE
759756
)
760757

761-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_plot_q)
762-
763758
output$data_table <- DT::renderDataTable({
764759
plot_brush <- pws$brush()
765760

@@ -788,14 +783,6 @@ srv_g_scatterplot.picks <- function(id,
788783
}
789784
})
790785

791-
# Render R code.
792-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
793-
794-
teal.widgets::verbatim_popup_srv(
795-
id = "rcode",
796-
verbatim_content = source_code_r,
797-
title = "R Code for scatterplot"
798-
)
799-
decorated_output_dims_q
786+
set_chunk_dims(pws, decorated_output_plot_q)
800787
})
801788
}

R/tm_g_scatterplotmatrix_picks.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ ui_g_scatterplotmatrix.picks <- function(id,
103103
)
104104
)
105105
),
106-
forms = tagList(
107-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
108-
),
109106
pre_output = pre_output,
110107
post_output = post_output
111108
)
@@ -283,8 +280,6 @@ srv_g_scatterplotmatrix.picks <- function(id,
283280
width = plot_width
284281
)
285282

286-
decorated_output_dims_q <- set_chunk_dims(pws, decorated_output_q)
287-
288283
# show a message if conversion to factors took place
289284
output$message <- renderText({
290285
cols_names <- req(merge_vars())
@@ -305,15 +300,7 @@ srv_g_scatterplotmatrix.picks <- function(id,
305300
}
306301
})
307302

308-
# Render R code.
309-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_dims_q())))
310-
311-
teal.widgets::verbatim_popup_srv(
312-
id = "rcode",
313-
verbatim_content = source_code_r,
314-
title = "Show R Code for Scatterplotmatrix"
315-
)
316-
decorated_output_dims_q
303+
set_chunk_dims(pws, decorated_output_q)
317304
})
318305
}
319306

R/tm_t_crosstable_picks.R

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ ui_t_crosstable.picks <- function(id, x, y, show_percentage, show_total, remove_
9494
),
9595
ui_decorate_teal_data(ns("decorator"), decorators = select_decorators(decorators, "table"))
9696
),
97-
forms = tagList(
98-
teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
99-
),
10097
pre_output = pre_output,
10198
post_output = post_output
10299
)
@@ -262,19 +259,9 @@ srv_t_crosstable.picks <- function(id, data, label, x, y, remove_zero_columns, b
262259
tail(teal.code::get_outputs(obj), 1)[[1]]
263260
})
264261

265-
teal.widgets::table_with_settings_srv(
266-
id = "table",
267-
table_r = table_r
268-
)
262+
teal.widgets::table_with_settings_srv(id = "table", table_r = table_r)
269263

270-
# Render R code.
271-
source_code_r <- reactive(teal.code::get_code(req(decorated_output_q())))
272264

273-
teal.widgets::verbatim_popup_srv(
274-
id = "rcode",
275-
verbatim_content = source_code_r,
276-
title = "Show R Code for Cross-Table"
277-
)
278265
decorated_output_q
279266
})
280267
}

0 commit comments

Comments
 (0)