Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: teal.modules.general
Title: General Modules for 'teal' Applications
Version: 0.4.0.9000
Version: 0.4.1
Date: 2025-02-28
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# teal.modules.general 0.4.0.9000
# teal.modules.general 0.4.1

### Bug fixes
* Fixes output is not updated when filter is added for the modules: `tm_a_pca`, `tm_a_regression`, `tm_g_scatterplot`, `tm_g_association`, `tm_g_bivariate`, `tm_g_distribution`, `tm_g_response`, `tm_t_crosstable` (#870)

# teal.modules.general 0.4.0

Expand Down
6 changes: 4 additions & 2 deletions R/tm_a_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,12 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl
selector_list = selector_list,
datasets = data
)
qenv <- teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("tidyr")') # nolint quotes
)
anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

Expand Down
7 changes: 3 additions & 4 deletions R/tm_a_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,13 @@ srv_a_regression <- function(id,
)
})

qenv <- teal.code::eval_code(
data(),
'library("ggplot2");library("dplyr")' # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes
)

anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

Expand Down
7 changes: 3 additions & 4 deletions R/tm_g_association.R
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,12 @@ srv_tm_g_association <- function(id,
selector_list = selector_list
)

qenv <- teal.code::eval_code(
data(),
'library("ggplot2");library("dplyr");library("tern");library("ggmosaic")' # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("tern");library("ggmosaic")') # nolint quotes
)
anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>% teal.code::eval_code(as.expression(anl_merged_input()$expr))
qenv() %>% teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

merged <- list(
Expand Down
7 changes: 3 additions & 4 deletions R/tm_g_bivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,13 @@ srv_g_bivariate <- function(id,
selector_list = selector_list,
datasets = data
)
qenv <- teal.code::eval_code(
data(),
'library("ggplot2");library("dplyr");library("teal.modules.general")' # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr");library("teal.modules.general")') # nolint quotes
)

anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

Expand Down
7 changes: 3 additions & 4 deletions R/tm_g_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,13 @@ srv_distribution <- function(id,
datasets = data
)

qenv <- teal.code::eval_code(
data(),
'library("ggplot2");library("dplyr")' # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes
)

anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

Expand Down
7 changes: 3 additions & 4 deletions R/tm_g_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,13 @@ srv_g_response <- function(id,
datasets = data
)

qenv <- teal.code::eval_code(
data(),
'library("ggplot2");library("dplyr")' # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes
)

anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

Expand Down
6 changes: 4 additions & 2 deletions R/tm_g_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,13 @@ srv_g_scatterplot <- function(id,
datasets = data,
merge_function = "dplyr::inner_join"
)
qenv <- teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("ggplot2");library("dplyr")') # nolint quotes
)

anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr)) %>%
teal.code::eval_code(quote(ANL)) # used to display table when running show-r-code code
})
Expand Down
6 changes: 4 additions & 2 deletions R/tm_t_crosstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y,
selector_list = selector_list,
merge_function = merge_function
)
qenv <- teal.code::eval_code(data(), 'library("rtables");library("tern");library("dplyr")') # nolint quotes
qenv <- reactive(
teal.code::eval_code(data(), 'library("rtables");library("tern");library("dplyr")') # nolint quotes
)
anl_merged_q <- reactive({
req(anl_merged_input())
qenv %>%
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})

Expand Down