Skip to content

Commit 0f74447

Browse files
committed
add Module's code section header to divide code preparation with data filtering with module's code
1 parent 6773637 commit 0f74447

11 files changed

+12
-1
lines changed

R/tm_a_pca.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, deco
436436
qenv <- reactive({
437437
obj <- data()
438438
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Principal Component Analysis", after = 0)
439+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
439440
teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes
440441
})
441442
anl_merged_q <- reactive({

R/tm_a_regression.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ srv_a_regression <- function(id,
460460
qenv <- reactive({
461461
obj <- data()
462462
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Linear Regression Plot", after = 0)
463+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
463464
teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes
464465
})
465466

R/tm_g_association.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ srv_tm_g_association <- function(id,
344344
qenv <- reactive({
345345
obj <- data()
346346
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Association Plot", after = 0)
347+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
347348
teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint quotes
348349
})
349350
anl_merged_q <- reactive({

R/tm_g_bivariate.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,8 @@ srv_g_bivariate <- function(id,
557557
anl_merged_q <- reactive({
558558
obj <- data()
559559
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Bivariate Plot", after = 0)
560-
obj |>
560+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
561+
obj %>%
561562
teal.code::eval_code(
562563
c(
563564
expression(library(ggplot2), library(dplyr), library(teal.modules.general)),

R/tm_g_distribution.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ srv_distribution <- function(id,
637637

638638
obj <- merged$anl_q_r()
639639
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Distribution Plot", after = 0)
640+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
640641

641642
ANL <- obj[["ANL"]]
642643
dist_var <- merge_vars()$dist_var

R/tm_g_response.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ srv_g_response <- function(id,
409409

410410
qenv <- merged$anl_q_r()
411411
teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Response Plot", after = 0)
412+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
412413
ANL <- qenv[["ANL"]]
413414
resp_var <- as.vector(merged$anl_input_r()$columns_source$response)
414415
x <- as.vector(merged$anl_input_r()$columns_source$x)

R/tm_g_scatterplot.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ srv_g_scatterplot <- function(id,
587587
qenv <- reactive({
588588
obj <- data()
589589
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot", after = 0)
590+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
590591
teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint quotes
591592
})
592593

R/tm_g_scatterplotmatrix.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ srv_g_scatterplotmatrix <- function(id,
330330
req(anl_merged_input())
331331
obj <- data()
332332
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Scatter Plot Matrix", after = 0)
333+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
333334
qenv <- teal.code::eval_code(obj, 'library("dplyr");library("lattice")') # nolint: quotes.
334335
teal.code::eval_code(qenv, as.expression(anl_merged_input()$expr))
335336
})

R/tm_missing_data.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ srv_missing_data <- function(id,
528528
anl <- data_r()
529529
obj <- data()
530530
teal.reporter::teal_card(obj) <- append(teal.reporter::teal_card(obj), "# Missing Data", after = 0)
531+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
531532

532533
qenv <- teal.code::eval_code(obj, {
533534
'library("dplyr");library("ggplot2");library("tidyr");library("gridExtra")' # nolint quotes

R/tm_outliers.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ srv_outliers <- function(id, data, outlier_var,
474474
ANL <- merged$anl_q_r()[["ANL"]]
475475
qenv <- merged$anl_q_r()
476476
teal.reporter::teal_card(qenv) <- append(teal.reporter::teal_card(qenv), "# Outliers Analysis", after = 0)
477+
teal.reporter::teal_card(obj) <- c(teal.reporter::teal_card(obj), "# Module's code")
477478

478479
outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var)
479480
categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var)

0 commit comments

Comments
 (0)