Skip to content

Commit 8fba660

Browse files
committed
Merge branch '786_attached_packages@main' of https://github.com/insightsengineering/teal.modules.general into 786_attached_packages@main
2 parents 867bcd6 + 41d3585 commit 8fba660

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

R/tm_a_regression.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ srv_a_regression <- function(id,
512512
selected = restoreInput(ns("label_var"), selected)
513513
)
514514

515-
data <- fortify(stats::lm(form, data = ANL))
515+
data <- ggplot2::fortify(stats::lm(form, data = ANL))
516516
cooksd <- data$.cooksd[!is.nan(data$.cooksd)]
517517
max_outlier <- max(ceiling(max(cooksd) / mean(cooksd)), 2)
518518
cur_outlier <- isolate(input$outlier)
@@ -652,7 +652,7 @@ srv_a_regression <- function(id,
652652
substitute(
653653
expr = {
654654
class(fit$residuals) <- NULL
655-
data <- fortify(fit)
655+
data <- ggplot2::fortify(fit)
656656
plot <- graph
657657
},
658658
env = list(

R/tm_g_association.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ srv_tm_g_association <- function(id,
344344

345345
qenv <- teal.code::eval_code(
346346
data(),
347-
'library("ggplot2");library("dplyr");library("tern");library("ggmosaic");library("grid")' # nolint quotes
347+
'library("ggplot2");library("dplyr");library("tern");library("ggmosaic")' # nolint quotes
348348
)
349349
anl_merged_q <- reactive({
350350
req(anl_merged_input())
@@ -502,8 +502,9 @@ srv_tm_g_association <- function(id,
502502
teal.code::eval_code(
503503
substitute(
504504
expr = {
505-
plot_top <- plot_calls[[1]]
506-
plot_bottom <- plot_calls[[1]]
505+
plots <- plot_calls
506+
plot_top <- plots[[1]]
507+
plot_bottom <- plots[[2]]
507508
plot <- tern::stack_grobs(grobs = lapply(list(plot_top, plot_bottom), ggplot2::ggplotGrob))
508509
},
509510
env = list(

R/tm_g_response.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ srv_g_response <- function(id,
492492

493493
if (!freq) {
494494
plot_call <- substitute(
495-
plot_call + expand_limits(y = c(0, 1.1)),
495+
plot_call + ggplot2::expand_limits(y = c(0, 1.1)),
496496
env = list(plot_call = plot_call)
497497
)
498498
}

0 commit comments

Comments
 (0)